]>
Commit | Line | Data |
---|---|---|
f867df69 SL |
1 | From b7bf92f965fd568eb9c7a345d77ddcf8abda1502 Mon Sep 17 00:00:00 2001 |
2 | From: Dan Carpenter <dan.carpenter@oracle.com> | |
3 | Date: Mon, 17 Dec 2018 10:02:42 +0300 | |
4 | Subject: thermal: int340x_thermal: Fix a NULL vs IS_ERR() check | |
5 | ||
6 | [ Upstream commit 3fe931b31a4078395c1967f0495dcc9e5ec6b5e3 ] | |
7 | ||
8 | The intel_soc_dts_iosf_init() function doesn't return NULL, it returns | |
9 | error pointers. | |
10 | ||
11 | Fixes: 4d0dd6c1576b ("Thermal/int340x/processor_thermal: Enable auxiliary DTS for Braswell") | |
12 | Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> | |
13 | Signed-off-by: Zhang Rui <rui.zhang@intel.com> | |
14 | Signed-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 | ||
19 | diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c | |
20 | index 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 | -- | |
33 | 2.19.1 | |
34 |