Skip to content

Commit 84b64de

Browse files
Wei YongjunEduardo Valentin
authored andcommitted
thermal: armada: fix copy-paste error in armada_thermal_probe()
The return value from devm_kzalloc() is not checked correctly. The test is done against a wrong variable. Fix it. Fixes: e72f03ef2543 ("thermal: armada: use the resource managed registration helper alternative") Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Daniel Lezcano <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]>
1 parent 542cdf4 commit 84b64de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/armada_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static int armada_thermal_probe(struct platform_device *pdev)
611611
return -ENOMEM;
612612

613613
drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
614-
if (!priv)
614+
if (!drvdata)
615615
return -ENOMEM;
616616

617617
priv->dev = &pdev->dev;

0 commit comments

Comments
 (0)