thermal: int340x_thermal: Fix a NULL vs IS_ERR() check
Subsystems (2)
PATCH 1/1 thermal: int340x_thermal: Fix a NULL vs IS_ERR() check
The intel_soc_dts_iosf_init() function doesn't return NULL, it returns error pointers.
--- .../thermal/intel/int340x_thermal/processor_thermal_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +1 -1
@@ -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,
Signature · 1 line
2.17.1
Quoted 29 lines
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Monday, December 17, 2018 12:33 PM
To: Zhang, Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>; Srinivas Pandruvada <[email protected]>; Daniel Lezcano <[email protected]>; Pawnikar, Sumeet R <[email protected]>; Amit Kucheria <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] thermal:int340x_thermal: Fix a NULL vsIS_ERR()checkThe
intel_soc_dts_iosf_init()function doesn't return NULL, it returns error pointers.Fixes 4d0dd6c1576b ("Thermal/int340x/processor_thermal: Enable auxiliaryDTS for Braswell")
Signed-off-by Dan Carpenter <[email protected]>---
.../thermal/intel/int340x_thermal/processor_thermal_device.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +0
-0
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c static int proc_thermal_pci_probe(struct pci_dev · line 428
Quoted 7 lines
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +1
-1@@ -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) {
Thanks for finding this. Just curious to know the background of this bug. Is there any Bugzilla number ?
Quoted 5 lines
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +0
-0ret =pci_enable_msi (pdev);if (!ret) { ret = request_threaded_irq(pdev->irq, NULL,--
2.17.1