staging: ft1000: Fix goto error logic.
authorMarek Belisko <marek.belisko@open-nandra.com>
Wed, 24 Nov 2010 09:42:39 +0000 (10:42 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Nov 2010 19:45:24 +0000 (11:45 -0800)
Fix goto error logic which could lead to kernel panics
because kthread_stop() is called in not correct error
conditions. Seen it sometimes when dsp_reload() fails
then I got kernel panic.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c

index f88ff86df1779932495806f470ef278879d8b5aa..d71ac30629f57a0062ab2b7f9c71643691519f0c 100644 (file)
@@ -204,9 +204,9 @@ static int ft1000_probe(struct usb_interface *interface,
 
        return 0;
 
-err_load:
-       kthread_stop(pft1000info->pPollThread);
 err_thread:
+       kthread_stop(pft1000info->pPollThread);
+err_load:
        kfree(pFileStart);
 err_fw:
        kfree(ft1000dev);