lkml.org 
[lkml]   [2006]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] raw: return negative from raw_init()
Date
On Monday 11 September 2006 21:19, Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> drivers/char/raw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/char/raw.c
> +++ b/drivers/char/raw.c
> @@ -312,7 +312,7 @@ static int __init raw_init(void)
>
> error:
> printk(KERN_ERR "error register raw device\n");
> - return 1;
> + return -1;
> }
>

How about reworking it a bit to pass true error code from the failed
call? Additionally class_device_create call is not checked for errors
there.

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-12 19:19    [W:0.040 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site