X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=drivers%2Fthermal%2Farmada_thermal.c;h=92f67d40f2e96a876083a71b6287e2bf159243c6;hb=a422757e8c323ae12163fa74bc21c41606a233df;hp=2c2f6d93034ec9764f3596d18cd3891d0e3565b6;hpb=196f4eeeb78f53e0a598db8f9408b6f8b270c355;p=linux.git diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 2c2f6d93034e..92f67d40f2e9 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -526,8 +526,8 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev, /* First memory region points towards the status register */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (IS_ERR(res)) - return PTR_ERR(res); + if (!res) + return -EIO; /* * Edit the resource start address and length to map over all the