Prev: sound/soc: use .dev.of_node instead of .node in struct of_device
Next: madness, was Re: [PATCH 2/2] Macintosh: fix coding style issues in adb.c This is a patch to the adb.c file that cleans up many warnings found by the checkpatch.pl tool
From: Sonny Rao on 11 Mar 2010 16:30 On Thu, Mar 11, 2010 at 06:15:53PM +0200, Jani Nikula wrote: > From: Jani Nikula <ext-jani.1.nikula(a)nokia.com> > > Use IS_ERR() instead of comparing to NULL. > > Signed-off-by: Jani Nikula <ext-jani.1.nikula(a)nokia.com> > > --- > > NOTE: I'm afraid I'm unable to test this; please consider this more a > bug report than a complete patch. > --- > drivers/char/bsr.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c > index c02db01..3b31f74 100644 > --- a/drivers/char/bsr.c > +++ b/drivers/char/bsr.c > @@ -252,7 +252,7 @@ static int bsr_add_node(struct device_node *bn) > > cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev, > cur, cur->bsr_name); > - if (!cur->bsr_device) { > + if (IS_ERR(cur->bsr_device)) { > printk(KERN_ERR "device_create failed for %s\n", > cur->bsr_name); > cdev_del(&cur->bsr_cdev); > -- > 1.6.5.2 > This looks fine to me, good catch. Acked-by: Sonny Rao <sonnyrao(a)us.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jiri Kosina on 15 Mar 2010 10:30
On Thu, 11 Mar 2010, Sonny Rao wrote: > > Use IS_ERR() instead of comparing to NULL. > > > > Signed-off-by: Jani Nikula <ext-jani.1.nikula(a)nokia.com> > > > > --- > > > > NOTE: I'm afraid I'm unable to test this; please consider this more a > > bug report than a complete patch. > > --- > > drivers/char/bsr.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c > > index c02db01..3b31f74 100644 > > --- a/drivers/char/bsr.c > > +++ b/drivers/char/bsr.c > > @@ -252,7 +252,7 @@ static int bsr_add_node(struct device_node *bn) > > > > cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev, > > cur, cur->bsr_name); > > - if (!cur->bsr_device) { > > + if (IS_ERR(cur->bsr_device)) { > > printk(KERN_ERR "device_create failed for %s\n", > > cur->bsr_name); > > cdev_del(&cur->bsr_cdev); > > -- > > 1.6.5.2 > > > > This looks fine to me, good catch. > > Acked-by: Sonny Rao <sonnyrao(a)us.ibm.com> Doesn't seem to be present in linux-next as of today, so I have picked it up. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |