From: Joseph Wright Date: Sun, 16 Jul 2017 14:48:58 +0000 (+0000) Subject: Staging: pi433: check error after kthread_run() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c7d42f37087d27a88b2ad27fa7e577f184ce5765;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Marcus Wolf Tested-by: Marcus Wolf Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index f886bed3ff10..ce76a9ea554d 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;