uwb: properly check kthread_run return value
authorAndrey Konovalov <andreyknvl@google.com>
Thu, 14 Sep 2017 12:30:55 +0000 (14:30 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 1 Jan 2018 20:50:49 +0000 (20:50 +0000)
commitc95d921ebf9e02853bd090f3b3845085082185f8
treedaa1fcd175391b0177c216b670027ef51ef38f42
parent82ff3c87e407b2497ae55c7802288759d0a864c6
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/uwb/uwbd.c