Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936009AbdGTLCq (ORCPT ); Thu, 20 Jul 2017 07:02:46 -0400 Received: from mailout02.webmailer.hosteurope.de ([80.237.138.58]:36079 "EHLO mailout02.webmailer.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933923AbdGTLCo (ORCPT ); Thu, 20 Jul 2017 07:02:44 -0400 X-Squirrel-UserHash: EhVcX1pHQwdXWkQFBhENSgEKLlwACw== X-Squirrel-FromHash: UwFaC1lCF1E= Message-ID: <962023a363631a61711915b30585aef8-EhVcX1pHQwdXWkQFBhENSgEKLlwACzJXX19HAVhEWENbS1kLMF52CEtUX1pBSEwcXlJRL1lQWAhaW34EU1c=-webmailer1@server01.webmailer.webmailer.hosteurope.de> In-Reply-To: <20170718130400.25436-3-colin.king@canonical.com> References: <20170718130400.25436-1-colin.king@canonical.com> <20170718130400.25436-3-colin.king@canonical.com> Date: Thu, 20 Jul 2017 13:02:42 +0200 Subject: Re: [PATCH 3/3][staging-next] staging: pi433: fix thread_run failure check From: "Wolf Entwicklungen" To: "Colin King" Cc: "Greg Kroah-Hartman" , "Marcus Wolf" , devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Marcus.Wolf@Wolf-Entwicklungen.de User-Agent: Host Europe Webmailer/1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Priority: 3 (Normal) Importance: Normal X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Status: not scanned, license restriction X-KLMS-AntiPhishing: not scanned, license restriction X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2017/07/20 02:14:00 #10132889; khse: 2015-01-01 01:01:01 X-KLMS-AntiVirus-Status: Clean, skipped X-HE-Access: Yes X-bounce-key: webpack.hosteurope.de;marcus.wolf@wolf-entwicklungen.de;1500548562;1d753343; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 36 Reviewed-by: Marcus Wolf Tested-by: Marcus Wolf Am Di, 18.07.2017, 15:04 schrieb Colin King: > From: Colin Ian King > > 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 > --- > 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 > > >