mirror of
https://github.com/torvalds/linux.git
synced 2024-12-20 10:01:56 +00:00
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@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
04c6620117
commit
1c46282421
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user