summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433
diff options
context:
space:
mode:
authorJoseph Wright <rjosephwright@gmail.com>2017-07-16 14:48:58 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-28 16:57:26 -0700
commitc7d42f37087d27a88b2ad27fa7e577f184ce5765 (patch)
tree6902cc210fee26e3d7a4038b549b4553ecbd65e9 /drivers/staging/pi433
parent7de77a3917e3b84e0bf1306fc26c39f43293a195 (diff)
downloadop-kernel-dev-c7d42f37087d27a88b2ad27fa7e577f184ce5765.zip
op-kernel-dev-c7d42f37087d27a88b2ad27fa7e577f184ce5765.tar.gz
Staging: pi433: check error after kthread_run()
Error should be checked with IS_ERR after calling kthread_run() instead of comparing the returned pointer to an int. Found by sparse warning: incompatible types for operation (<) left side has type struct task_struct *tx_task_struct right side has type int Signed-off-by: Joseph Wright <rjosephwright@gmail.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Tested-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/pi433')
-rw-r--r--drivers/staging/pi433/pi433_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index f886bed..ce76a9e 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1152,7 +1152,7 @@ static int pi433_probe(struct spi_device *spi)
device->tx_task_struct = kthread_run(pi433_tx_thread,
device,
"pi433_tx_task");
- if (device->tx_task_struct < 0)
+ if (IS_ERR(device->tx_task_struct))
{
dev_dbg(device->dev, "start of send thread failed");
goto send_thread_failed;
OpenPOWER on IntegriCloud