Skip to content

Commit

Permalink
staging: ft1000: Fix goto error logic.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent e999fb0 commit 4960b8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4960b8f

Please sign in to comment.