Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964894AbWILDeX (ORCPT ); Mon, 11 Sep 2006 23:34:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964905AbWILDeX (ORCPT ); Mon, 11 Sep 2006 23:34:23 -0400 Received: from gateway.insightbb.com ([74.128.0.19]:52784 "EHLO asav14.insightbb.com") by vger.kernel.org with ESMTP id S964894AbWILDeW (ORCPT ); Mon, 11 Sep 2006 23:34:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aa4HAB7GBUWBT4oKLA From: Dmitry Torokhov To: Alexey Dobriyan Subject: Re: [PATCH] raw: return negative from raw_init() Date: Mon, 11 Sep 2006 23:34:19 -0400 User-Agent: KMail/1.9.3 Cc: Andrew Morton , linux-kernel@vger.kernel.org References: <20060912011918.GC5192@martell.zuzino.mipt.ru> In-Reply-To: <20060912011918.GC5192@martell.zuzino.mipt.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609112334.19998.dtor@insightbb.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 824 Lines: 29 On Monday 11 September 2006 21:19, Alexey Dobriyan wrote: > Signed-off-by: Alexey Dobriyan > --- > > 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/