lkml.org 
[lkml]   [2012]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] powerpc/BSR: cleanup the error path of bsr_init
Date
On Sunday 15 July 2012, Devendra Naga wrote:
> class_create if succeeded returns a pointer to the struct class,
> and if it fails, it returns a value enclosed by the pointer, which
> can be read by using PTR_ERR.
>
> Handle the error and return it.
>
> result is for error checking of the alloc_chrdev_region, instead
> ret can be used, and also if the alloc_chrdev_region fail,
> we are still returning -ENODEV, use ret and the error path will
> take care of returning of the ret.
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>


\
 
 \ /
  Last update: 2012-07-15 22:41    [W:0.027 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site