Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297525

Re: [PATCH] IB/usnic: delete unneeded IS_ERR test

From Doug Ledford <dledford@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] IB/usnic: delete unneeded IS_ERR test
Date 2015-12-23 17:20 +0100
Message-ID <qIUiR-3tm-1@gated-at.bofh.it> (permalink)
References <qHwVk-8mU-11@gated-at.bofh.it> <qIxcC-5Ia-3@gated-at.bofh.it>
Organization Red Hat, Inc.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 12/22/2015 10:29 AM, Dave Goodell wrote:
> [copying Nelson too]
> 
> On Sat, Dec 19, 2015 at 09:48:59PM +0100, Julia Lawall wrote:
>> kzalloc doesn't return ERR_PTR, so there is no need to test for it.
>>
>> The semantic match that finds this problem is as follows:
>> (http://coccinelle.lip6.fr/)
>>
>> // <smpl>
>> @@
>> expression x,e;
>> @@
>>
>> * x = kzalloc(...)
>> ... when != x = e
>> * IS_ERR_OR_NULL(x)
>> // </smpl>
>>
>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Reviewed-by: Dave Goodell <dgoodell@cisco.com>
> 
> -Dave
> 

Thanks, applied.

-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: 0E572FDD


Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] IB/usnic: delete unneeded IS_ERR test Julia Lawall <Julia.Lawall@lip6.fr> - 2015-12-19 22:10 +0100
  Re: [PATCH] IB/usnic: delete unneeded IS_ERR test Dave Goodell <dgoodell@cisco.com> - 2015-12-22 16:40 +0100
    Re: [PATCH] IB/usnic: delete unneeded IS_ERR test Doug Ledford <dledford@redhat.com> - 2015-12-23 17:20 +0100

csiph-web