From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60655C43381 for ; Fri, 15 Feb 2019 02:42:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2495B21B68 for ; Fri, 15 Feb 2019 02:42:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550198547; bh=90tLrpIZ9fYPKFa+OArdpxSuF8xpIN6Q2I4tx3VhnFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WoH5Wa4i7nc9JamDaQfvMZt6Q92FMnO2I8o/nkaXOozIiRGnlTqHYCda6MgPffTyX K3JYB2iqz85b6NvNvCzkJNLGU4w7PVAIvd8TXMhxMmAw1wJC0Jq6TSl9bkb2HBZFwi vrvLpWD+sZIPVgcTVvZ8itaLCAtZLqjnkmbwBJnw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730138AbfBOCmZ (ORCPT ); Thu, 14 Feb 2019 21:42:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:49426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731511AbfBOCJN (ORCPT ); Thu, 14 Feb 2019 21:09:13 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91009206BA; Fri, 15 Feb 2019 02:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550196553; bh=90tLrpIZ9fYPKFa+OArdpxSuF8xpIN6Q2I4tx3VhnFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pbVnBYMkXwJDwq5mhDhEhNPwi3TLvwgPnHgFL8OAZVyAL205xVZtrBxkX5wU6l7g7 X5exBaIncp65S7O35lzlxsaql8xgWtSkZsd72/duHKiPwfOYq2tnwPrziexHEKUMja mai0ICW2liMk1fI8Ds2X7vlWUU+NnYbgrHsoGiqw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dan Carpenter , Zhang Rui , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 4.20 11/77] thermal: int340x_thermal: Fix a NULL vs IS_ERR() check Date: Thu, 14 Feb 2019 21:07:49 -0500 Message-Id: <20190215020855.176727-11-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215020855.176727-1-sashal@kernel.org> References: <20190215020855.176727-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Carpenter [ Upstream commit 3fe931b31a4078395c1967f0495dcc9e5ec6b5e3 ] The intel_soc_dts_iosf_init() function doesn't return NULL, it returns error pointers. Fixes: 4d0dd6c1576b ("Thermal/int340x/processor_thermal: Enable auxiliary DTS for Braswell") Signed-off-by: Dan Carpenter Signed-off-by: Zhang Rui Signed-off-by: Sasha Levin --- drivers/thermal/int340x_thermal/processor_thermal_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c index 284cf2c5a8fd..8e0f665cf06f 100644 --- a/drivers/thermal/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/int340x_thermal/processor_thermal_device.c @@ -423,7 +423,7 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, proc_priv->soc_dts = intel_soc_dts_iosf_init( INTEL_SOC_DTS_INTERRUPT_MSI, 2, 0); - if (proc_priv->soc_dts && pdev->irq) { + if (!IS_ERR(proc_priv->soc_dts) && pdev->irq) { ret = pci_enable_msi(pdev); if (!ret) { ret = request_threaded_irq(pdev->irq, NULL, -- 2.19.1