Hello!
On 10/23/2019 09:58 PM, Andy Shevchenko wrote:
>>> + int error;
>>> +
>>> + error = pm_runtime_get(cdd->ddev.dev);
>>> + if (error < 0) {
>>
>> I'd call that variable 'status', comparison (error < 0) just doesn't look
>> right.
>> If it was *if* (error), it would have been more correct.
>
> It's error when it's negative. That's how PM runtime is designed.
Most of the other code too. However, the RPM code tends to return
positive values if a call is OK, so you have to go greater lengths and
check a result for < 0. Calling the variable 'error' doesn't seem right
in this context...
>>> + pm_runtime_put_noidle(cdd->ddev.dev);
>>> +
>>> + return NULL;
>>> + }
MBR, Sergei