I had that code a while back. I recall it being related to a defective Mass Air Flow (MAF) sensor, which was replaced under warranty at the time.But I just checked All-Data, and it shows P1171 as "Long Term Fuel Trim (Upper Limit)," as opposed to P1172 "Long Term Fuel Trim (Lower Limit)." Interestingly, both translate to the same VADIS code (ECM-261A). The upper limit code has to do with a lean condition, and the lower limit code is a rich condition.
Only for the lower limit code (P1172) do they suggest that a new MAF sensor is one of the suggested fixes. For what it's worth, that's a very common failure point on our cars.
Among the upper limit code causes, they mention the evaporative canister purge valve as being one possible source of a vacuum leak which would cause this code. The CP valve is another very common failure point on our cars.
The CP valve costs a whopping $18 from FCP Groton, and is very easy to replace. It's mounted on the air filter assembly. If it were my car, I'd poke around for loose or cracked vacuum lines, then I'd replace the CP valve, and then I'd clear the code. If the problem recurred, I'd throw a new MAF sensor on it in hopes that "this guy on the internet isn't totally senile and is actually on to something." The MAF is also pretty easy to replace.
In all cases, you're going to need to clear the code with a code reader. See http://www.jimrothe.com/volvo/....html.