[PATCH] staging: ft1000: Fix goto error logic.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index f88ff86..d71ac30 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -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);
-- 
1.7.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux