Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp208965imj; Thu, 14 Feb 2019 18:44:45 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia4CkJ0OhOx1wpV3c2/KLS9EnUNq2JiPoKNyoUOzrqZyiLWMgnFmxfE7S6imLyA/xcujdeL X-Received: by 2002:aa7:819a:: with SMTP id g26mr7384589pfi.187.1550198685516; Thu, 14 Feb 2019 18:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550198685; cv=none; d=google.com; s=arc-20160816; b=oNEElWLfU5hLuv2vjnrDsA4ee72h9WOqFI/qeXAecXQ9NecxR/v6sIzb/dK7ZYWAaf fscWLyHS7TOg/DBeL7o9MSppb8tp4nAH3IkmDUUeEiJJtTolZfz9R3NGGszR6m9IQ5W5 T9jcHAbVGRgUEJ4Vly9kxZDemmKKha8i0/jz63/UE7evCWGKnw4a4ZdEuX8/i4kbxHxi TiFvZnvGGKTx5bzH6BPLPcLFSbYYjZPxnyu1gmtFOThVXoZNJ0sfI2BZkrAaiv+pisPZ jSlaPYsg05GnbIQxCd0DFT5m1gvT8mPBt49c6GElhYYYCA7s7UZVjx1D/5GmrLl/P/j2 h5qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BZfjqdPnQAerHc+3bAOBv1Jj0DVG/QD3yUwIPoxdfGc=; b=OD3tBVhXtzpXkbQa4FtOTAWxIZF3l2xFATeYNbX06G0veBmwjR8+dwQeuNfqX+MjWl 6dro7S2CtBfUORzcNZkARGhIeJEJDQP81T5AuuNDbuO7PsnW+mLjerG28dIt04IJwX+p XAiGsZTSxpDgh0Bk2YS+NKfvBfvc8SK9rOE9it3aCemAY3f+DSwiypWVTYG/J3HiGqIL JYP3SIkyP7lz0M0Pbkaima2M8XsM0WwRt6FTrIkkkfYNosp+n4Bl1glSs+VezRlHysx0 BUsASf/TtpFYAAD9yR4YmIWZND1luQsq0hV3qcUGwmdNuhDmTqcUBShvQ0m43zdP9Xo/ zu2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pbVnBYMk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si4060585plr.66.2019.02.14.18.44.29; Thu, 14 Feb 2019 18:44:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pbVnBYMk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732177AbfBOCm1 (ORCPT + 99 others); Thu, 14 Feb 2019 21:42:27 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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