lkml.org 
[lkml]   [2015]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: fix checking return value of blk_mq_init_queue
On Fri, Jan 02, 2015 at 08:53:11AM -0700, Jens Axboe wrote:
> On 01/02/2015 07:25 AM, Ming Lei wrote:
> >Check IS_ERR_OR_NULL(return value) instead of just return value.
>
> Thanks Ming, applied.

Umm... Looking at the callers, I'd suggest making it _never_ return NULL -
it's always treates as ERR_PTR(-ENOMEM) anyway. Then the checks would be
just IS_ERR(...).

IS_ERR_OR_NULL() is very often a sign of lousy calling conventions and
this case is no exception...


\
 
 \ /
  Last update: 2015-01-02 18:41    [W:0.052 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site