mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Belisko <marek.belisko@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>,
	Marek Belisko <marek.belisko@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Marek Belisko <marek.belisko@gmail.com>
Subject: [PATCH] staging:ft1000: Use specific error return code for reg_ft1000_netdev(). Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Date: Fri, 15 Oct 2010 09:41:45 +0200	[thread overview]
Message-ID: <1287128505-15739-1-git-send-email-marek.belisko@gmail.com> (raw)

---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c  |    6 +++---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c |    4 +++-
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.h |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 999abb6..3e1a6bf 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1112,7 +1112,7 @@ err_net:
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf)
+int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf)
 {
     struct net_device *netdev;
     FT1000_INFO *pInfo;
@@ -1133,7 +1133,7 @@ u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
     {
         DEBUG("reg_ft1000_netdev: could not register network device\n");
         free_netdev(netdev);
-        return STATUS_FAILURE;
+	return rc;
     }
 
 
@@ -1162,7 +1162,7 @@ u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
     pInfo->CardReady = 1;
 
 
-   return STATUS_SUCCESS;
+	return 0;
 }
 
 static int ft1000_reset(struct net_device *dev)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index a2c415e..5fae954 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -191,7 +191,9 @@ static int ft1000_probe(struct usb_interface *interface,
 
 	DEBUG("ft1000_probe::Card Ready!!!! Registering network device\n");
 
-	reg_ft1000_netdev(ft1000dev, interface);
+	ret = reg_ft1000_netdev(ft1000dev, interface);
+	if (ret)
+		goto err_load;
 
 	pft1000info->NetDevRegDone = 1;
 
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index 27ee304..ee54372 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -634,7 +634,7 @@ char *getfw (char *fn, size_t *pimgsz);
 int dsp_reload(struct ft1000_device *ft1000dev);
 u16 init_ft1000_netdev(struct ft1000_device *ft1000dev);
 struct usb_interface;
-u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf);
+int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf);
 int ft1000_poll(void* dev_id);
 
 void ft1000InitProc(struct net_device *dev);
-- 
1.7.1


                 reply	other threads:[~2010-10-15  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287128505-15739-1-git-send-email-marek.belisko@gmail.com \
    --to=marek.belisko@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®