my 08 did the same thing with the tps sensor issue. since it was out of warranty and you have to swap the entire throttle body (little expensive) i just took the tb off and cleaned it real good. CEL reset itself and problem solved.
Until the AFM failed and didnt reactivate #6 lifter wich chewed up the camshaft. and so on. 3K miles out of warranty. rebuilt top end of the motor. deleted AFM and added a cam and other stuff. gained 75 whp and installing a magna charger this month.