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:51:19 +0000 (11:51 +0200)
commit8ff7adb930d4a62f43dfc76220a988a043c510ff
tree7db4d514d8797f27df82928d7c8e0cb6992d37d4
parentec8a7153bbf3742658ca71ab536505254d04cabd
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