[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1291907634-22437-3-git-send-email-marek.belisko@open-nandra.com>
Date: Thu, 9 Dec 2010 16:13:49 +0100
From: Marek Belisko <marek.belisko@...n-nandra.com>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Marek Belisko <marek.belisko@...n-nandra.com>
Subject: [PATCH 3/8] staging: ft1000: Use return value for ft1000InitProc.
Add checking for return value ft1000InitProc and cleanup
if something fail.
Signed-off-by: Marek Belisko <marek.belisko@...n-nandra.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index 7dfed41..0e1fc3f 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -198,12 +198,17 @@ static int ft1000_probe(struct usb_interface *interface,
if (ret)
goto err_thread;
- pft1000info->NetDevRegDone = 1;
+ ret = ft1000InitProc(ft1000dev->net);
+ if (ret)
+ goto err_proc;
- ft1000InitProc(ft1000dev->net);
+ pft1000info->NetDevRegDone = 1;
return 0;
+err_proc:
+ unregister_netdev(ft1000dev->net);
+ free_netdev(ft1000dev->net);
err_thread:
kthread_stop(pft1000info->pPollThread);
err_load:
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists