lkml.org 
[lkml]   [2015]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)
On 03-08-15, 17:38, Steven Rostedt wrote:
> On Fri, 31 Jul 2015 13:23:10 +0300
> "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> > We have two cases in code:
> >
> > drivers/rtc/rtc-gemini.c: if (likely(IS_ERR(rtc->rtc_dev)))
> > drivers/staging/lustre/lustre/obdclass/lu_object.c: if (likely(IS_ERR(shadow) && PTR_ERR(shadow) == -ENOENT)) {
> >
> > The first one is mistake, I think. Or do we expect rtc_device_register()
> > to fail?
> >
> > The second is redundant. "if (PTR_ERR(shadow) == -ENOENT)" should do the
> > job.
> >
>
> Yep, those look like bugs to me.

Yeah, I have fixed both of them :)

--
viresh


\
 
 \ /
  Last update: 2015-08-04 04:41    [W:0.055 / U:1.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site