mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Marcus Wolf <linux@Wolf-Entwicklungen.de>,
	devel@driverdev.osuosl.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3][staging-next] staging: pi433: fix thread_run failure check
Date: Tue, 18 Jul 2017 14:04:00 +0100	[thread overview]
Message-ID: <20170718130400.25436-3-colin.king@canonical.com> (raw)
In-Reply-To: <20170718130400.25436-1-colin.king@canonical.com>

From: Colin Ian King <colin.king@canonical.com>

The check for thread_run failure is incorrect, use IS_ERR instead.

Cleans up sparse error message:
"error: incompatible types for operation (<)"

Fixes: 874bcba65f9a ("staging: pi433: New driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/pi433/pi433_if.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 95930a192de4..266e572ae66e 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1152,8 +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.11.0

  parent reply	other threads:[~2017-07-18 13:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 13:03 [PATCH 1/3][staging-next] staging: pi433: Make a couple of functions static Colin King
2017-07-18 13:03 ` [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static Colin King
2017-07-19 19:52   ` Marcus Wolf
2017-07-20 11:01   ` [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static Wolf Entwicklungen
2017-07-20 12:58     ` Colin Ian King
2017-07-20 15:03       ` Marcus Wolf
2017-07-29  0:00     ` Greg Kroah-Hartman
2017-07-29  9:09       ` Marcus Wolf
2017-07-29 10:59         ` Dan Carpenter
2017-07-20 11:04   ` [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static Wolf Entwicklungen
2017-07-18 13:04 ` Colin King [this message]
2017-07-20 11:02   ` [PATCH 3/3][staging-next] staging: pi433: fix thread_run failure check Wolf Entwicklungen
2017-07-20 11:03 ` [PATCH 1/3][staging-next] staging: pi433: Make a couple of functions static Wolf Entwicklungen
2017-07-28 23:59 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170718130400.25436-3-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@Wolf-Entwicklungen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®