Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751522AbdGRNEc (ORCPT ); Tue, 18 Jul 2017 09:04:32 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57839 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbdGRNEF (ORCPT ); Tue, 18 Jul 2017 09:04:05 -0400 From: Colin King To: Greg Kroah-Hartman , Marcus Wolf , 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 Message-Id: <20170718130400.25436-3-colin.king@canonical.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170718130400.25436-1-colin.king@canonical.com> References: <20170718130400.25436-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 948 Lines: 29 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