Subject: [PATCH v6 17/25] gpio/omap: use pm-runtime framework

From: [email-masked] (Kevin Hilman)
Date: Wed, 07 Sep 2011 05:32:32 -0700

"DebBarma, Tarun Kanti" <[email-masked]> writes:

> [...]
>>> + ? ? /*
>>> + ? ? ?* If this is the first gpio_request for the bank,
>>> + ? ? ?* enable the bank module.
>>> + ? ? ?*/
>>> + ? ? if (!bank->mod_usage)
>>> + ? ? ? ? ? ? if (IS_ERR_VALUE(pm_runtime_get_sync(bank->dev) < 0)) {
>>
>> All of the IS_ERR_VALUE() usage is wrong here. ?You're checking if the
>> result of IS_ERR_VALUE() is < 0 which will never happen.
> No.
> IS_ERR_VALUE is applied on the return value of pm_runtime_get_sync
> which is <  0.

...and is still not correct.

The result of the '< 0' check will be zero or one, so IS_ERR_VALUE()
will never be true.

Kevin