Skip to content

Commit ad079d9

Browse files
spandruvadadlezcano
authored andcommitted
thermal/drivers/int340x/processor_thermal: Fix warning for return value
Fix smatch warnings: drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c:258 proc_thermal_pci_probe() warn: missing error code 'ret' Use PTR_ERR to return failure of thermal_zone_device_register(). Reported-by: kernel test robot <[email protected]> Signed-off-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 24e21d9 commit ad079d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,10 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_
254254
pci_info->tzone = thermal_zone_device_register("TCPU_PCI", 1, 1, pci_info,
255255
&tzone_ops,
256256
&tzone_params, 0, 0);
257-
if (IS_ERR(pci_info->tzone))
257+
if (IS_ERR(pci_info->tzone)) {
258+
ret = PTR_ERR(pci_info->tzone);
258259
goto err_ret_mmio;
260+
}
259261

260262
/* request and enable interrupt */
261263
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);

0 commit comments

Comments
 (0)