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

DebBarma, Tarun Kanti tarun.kanti at ti.com
Wed Sep 7 08:53:10 EDT 2011


On Wed, Sep 7, 2011 at 6:02 PM, Kevin Hilman <khilman at ti.com> wrote:
> "DebBarma, Tarun Kanti" <tarun.kanti at ti.com> 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.
Ok.

>
> Kevin
>



More information about the linux-arm-kernel mailing list