Skip to content

Commit da2c4f3

Browse files
gopi487krishnaDaniel Lezcano
authored andcommitted
thermal/drivers/spear: Fix error condition for reading st,thermal-flags
of_property_read_u32 returns 0 on success. The current check returns -EINVAL if the property is read successfully. Fix the check by removing ! from of_property_read_u32 Fixes: b9c7aff ("drivers/thermal/spear_thermal.c: add Device Tree probing capability") Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org> Suggested-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/20260327090526.59330-1-krishnagopi487@gmail.com
1 parent 85f18ed commit da2c4f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/thermal/spear_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static int spear_thermal_probe(struct platform_device *pdev)
9393
struct device_node *np = pdev->dev.of_node;
9494
int ret = 0, val;
9595

96-
if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
96+
if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
9797
dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
9898
return -EINVAL;
9999
}

0 commit comments

Comments
 (0)