mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
thermal: armada: fix a test in probe()
[ Upstream commitd1d2c290b3] The platform_get_resource() function doesn't return error pointers, it returns NULL on error. Fixes:3d4e51844a("thermal: armada: convert driver to syscon register accesses") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bb925b9bec
commit
733fddc346
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user