lkml.org 
[lkml]   [2012]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Q: return of pinctrl_register and handing at drivers that use this function
From
On Mon, Jun 18, 2012 at 4:42 PM, devendra.aaru <devendra.aaru@gmail.com> wrote:
> On Mon, Jun 18, 2012 at 8:08 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Mon, Jun 18, 2012 at 2:04 PM, devendra.aaru <devendra.aaru@gmail.com> 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


\
 
 \ /
  Last update: 2012-06-20 10:41    [W:0.330 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site