lkml.org 
[lkml]   [2009]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers/regulator: use PTR_ERR to get error code
From
Date
On Sat, 2009-11-21 at 22:18 +0100, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> IS_ERR returns only 1 or 0. The callsite of setup_regulators expects a
> negative integer in an error case. Thus, PTR_ERR has to be used to extract
> it.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression E,E1;
> @@
>
> *E = IS_ERR(...)
> ... when != E = E1
> *return E;
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
>

Applied.

Thanks

Liam



\
 
 \ /
  Last update: 2009-11-23 12:03    [W:0.328 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site