uwb: properly check kthread_run return value
authorAndrey Konovalov <andreyknvl@google.com>
Thu, 14 Sep 2017 12:30:55 +0000 (14:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:27:35 +0000 (11:27 +0200)
commit5a21af11c6810b936b17a2c5c69518be0da8f4c3
tree40bd5cc7f59de6566b3aad16f2433de9517ed84e
parent8b4196420dd6a60c75b5d1d346a91d87cc013a0f
uwb: properly check kthread_run return value

commit bbf26183b7a6236ba602f4d6a2f7cade35bba043 upstream.

uwbd_start() calls kthread_run() and checks that the return value is
not NULL. But the return value is not NULL in case kthread_run() fails,
it takes the form of ERR_PTR(-EINTR).

Use IS_ERR() instead.

Also add a check to uwbd_stop().

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/uwbd.c