Skip to content

Commit

Permalink
thermal: armada: fix copy-paste error in armada_thermal_probe()
Browse files Browse the repository at this point in the history
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 <weiyongjun1@huawei.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Wei Yongjun authored and Eduardo Valentin committed Aug 1, 2018
1 parent 542cdf4 commit 84b64de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/armada_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static int armada_thermal_probe(struct platform_device *pdev)
return -ENOMEM;

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

priv->dev = &pdev->dev;
Expand Down

0 comments on commit 84b64de

Please sign in to comment.