]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/thermal-int340x_thermal-fix-a-null-vs-is_err-check.patch
drop perf-trace-support-multiple-vfs_getname-probes.patch from 4.4 and 4.9 queues
[thirdparty/kernel/stable-queue.git] / queue-4.4 / thermal-int340x_thermal-fix-a-null-vs-is_err-check.patch
CommitLineData
f867df69
SL
1From b7bf92f965fd568eb9c7a345d77ddcf8abda1502 Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <dan.carpenter@oracle.com>
3Date: Mon, 17 Dec 2018 10:02:42 +0300
4Subject: thermal: int340x_thermal: Fix a NULL vs IS_ERR() check
5
6[ Upstream commit 3fe931b31a4078395c1967f0495dcc9e5ec6b5e3 ]
7
8The intel_soc_dts_iosf_init() function doesn't return NULL, it returns
9error pointers.
10
11Fixes: 4d0dd6c1576b ("Thermal/int340x/processor_thermal: Enable auxiliary DTS for Braswell")
12Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
13Signed-off-by: Zhang Rui <rui.zhang@intel.com>
14Signed-off-by: Sasha Levin <sashal@kernel.org>
15---
16 drivers/thermal/int340x_thermal/processor_thermal_device.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c
20index ccc0ad02d0669..7f374ab5b1760 100644
21--- a/drivers/thermal/int340x_thermal/processor_thermal_device.c
22+++ b/drivers/thermal/int340x_thermal/processor_thermal_device.c
23@@ -363,7 +363,7 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev,
24 proc_priv->soc_dts = intel_soc_dts_iosf_init(
25 INTEL_SOC_DTS_INTERRUPT_MSI, 2, 0);
26
27- if (proc_priv->soc_dts && pdev->irq) {
28+ if (!IS_ERR(proc_priv->soc_dts) && pdev->irq) {
29 ret = pci_enable_msi(pdev);
30 if (!ret) {
31 ret = request_threaded_irq(pdev->irq, NULL,
32--
332.19.1
34