diff options
author | Marek Belisko <marek.belisko@gmail.com> | 2010-11-10 09:29:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-10 16:28:29 -0800 |
commit | c8b124e21dbb7f4941f292fea446ce63d92d80dd (patch) | |
tree | 25cd6753ba03ae1dae6358ba9bb66dc70ddfaa6f /drivers | |
parent | a10bb4fb199bd7a1dc178a6228ad749f5070e0f9 (diff) |
staging: ft1000: Check return value of kthread_run.
kthread_run could fail so we will check return value.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c index 41bbe991f0de..dcbc97c432e5 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c @@ -175,6 +175,12 @@ static int ft1000_probe(struct usb_interface *interface, gPollingfailed = FALSE; pft1000info->pPollThread = kthread_run(ft1000_poll_thread, ft1000dev, "ft1000_poll"); + + if (IS_ERR(pft1000info->pPollThread)) { + ret = PTR_ERR(pft1000info->pPollThread); + goto err_load; + } + msleep(500); while (!pft1000info->CardReady) { |