From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757653AbYDTRLQ (ORCPT ); Sun, 20 Apr 2008 13:11:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754277AbYDTRK6 (ORCPT ); Sun, 20 Apr 2008 13:10:58 -0400 Received: from ZSM1387.piap.pl ([195.187.100.11]:54391 "EHLO khc.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754164AbYDTRK5 convert rfc822-to-8bit (ORCPT ); Sun, 20 Apr 2008 13:10:57 -0400 To: Jeff Garzik Cc: , netdev@vger.kernel.org Subject: [PATCH] WAN: Fix confusing insmod error code for C101 too. From: Krzysztof Halasa Date: Sun, 20 Apr 2008 19:10:56 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org WAN: Fix confusing insmod error code for C101 too. Signed-off-by: Krzysztof Hałasa diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index c4c8eab..c2cc42f 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c @@ -402,7 +402,7 @@ static int __init c101_init(void) #ifdef MODULE printk(KERN_INFO "c101: no card initialized\n"); #endif - return -ENOSYS; /* no parameters specified, abort */ + return -EINVAL; /* no parameters specified, abort */ } printk(KERN_INFO "%s\n", version); @@ -420,11 +420,11 @@ static int __init c101_init(void) c101_run(irq, ram); if (*hw == '\x0') - return first_card ? 0 : -ENOSYS; + return first_card ? 0 : -EINVAL; }while(*hw++ == ':'); printk(KERN_ERR "c101: invalid hardware parameters\n"); - return first_card ? 0 : -ENOSYS; + return first_card ? 0 : -EINVAL; }