]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Mon, 18 Sep 2017 09:28:23 +0000 (11:28 +0200)
commit86c46c44aa4be7a18acc9f3db5477efb621dabf5
tree7dc0c8b71b9984c3237dcd7b285f5c1fd7b8668b
parentf8ff495b9c7aa3b6af852d0fd94e1dc78250619c
uwb: properly check kthread_run return value

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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/uwbd.c