Skip to content

Commit

Permalink
staging: ft1000: Use return value for ft1000InitProc.
Browse files Browse the repository at this point in the history
Add checking for return value ft1000InitProc and cleanup
if something fail.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Dec 10, 2010
1 parent 04c6620 commit 1c46282
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1c46282

Please sign in to comment.