General error estimate for adiabatic quantum computing