have code p0171 on 2004 Mazda Mazda6

what could be the prob?

Asked by for the 2004 Mazda Mazda6
The P0171 indicates a lean air-fuel ratio. It could sets by several different reasons i.e.: dirty, restricted injectors, bad or dirty Mass Air Flow Sensor, disconnected or leaking vacuum hoses, leaking intake manifold gasket, leaking exhaust , O2 sensor etc...
You can check for disconnected or broken vacuum hoses and maybe clean the MAF sensor. CRC sells a good MAF cleaner, you can buy it in most parts store. Don't use other chemicals, you can damage the sensor.