Re: Q: return of pinctrl_register and handing at drivers that usethis function

From: Linus Walleij
Date: Wed Jun 20 2012 - 03:52:03 EST


On Mon, Jun 18, 2012 at 4:42 PM, devendra.aaru <devendra.aaru@xxxxxxxxx> wrote:
> On Mon, Jun 18, 2012 at 8:08 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>> On Mon, Jun 18, 2012 at 2:04 PM, devendra.aaru <devendra.aaru@xxxxxxxxx> wrote:
>>
>>> So checking the return value of pinctrl_register with IS_ERR is not required.
>>
>> Nope.
>
> You mean to say that the check "IS_ERR(ret_ptr)" is not required? or
> the other way like its also needed.

I mean it shall be tested like this:

if (!pinmctrl_register(&foo)) {
/* error case */
}

No IS_ERR() business.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/