Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694141

[PATCH] staging: pi433: use IS_ERR to check kthread_run return value

From Paolo Cretaro <paolocretaro@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] staging: pi433: use IS_ERR to check kthread_run return value
Date 2017-07-22 12:30 +0200
Message-ID <u5ZPA-Jq-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Fix compiler warning: ordered comparison of pointer with integer zero

Signed-off-by: Paolo Cretaro <paolocretaro@gmail.com>
---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 1bc478a7f49e..79bd19123239 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;
-- 
2.13.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] staging: pi433: use IS_ERR to check kthread_run return value Paolo Cretaro <paolocretaro@gmail.com> - 2017-07-22 12:30 +0200
  Re: [PATCH] staging: pi433: use IS_ERR to check kthread_run return  value Paolo Cretaro <paolocretaro@gmail.com> - 2017-07-22 12:40 +0200

csiph-web