[PATCH 3.19.y-ckt 075/146] thermal: rockchip: fix an error code
Kamal Mostafa
kamal at canonical.com
Wed Jun 17 22:23:00 UTC 2015
3.19.8-ckt2 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter at oracle.com>
commit 0d0a2bf6ed4b489eef9a84450b3d90e6e001ce63 upstream.
There is a copy and paste bug, "->clk" vs "->pclk", so we return the
wrong error code here.
Fixes: cbac8f639437 ('thermal: rockchip: add driver for thermal')
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Reviewed-by: Caesar Wang <wxt at rock-chips.com>
Reviewed-by: Doug Anderson <dianders at chromium.org>
Tested-by: Caesar Wang <wxt at rock-chips.com>
Signed-off-by: Zhang Rui <rui.zhang at intel.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/thermal/rockchip_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 9c6ce54..aba843a 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -519,7 +519,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
thermal->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
if (IS_ERR(thermal->pclk)) {
- error = PTR_ERR(thermal->clk);
+ error = PTR_ERR(thermal->pclk);
dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n",
error);
return error;
--
1.9.1
More information about the kernel-team
mailing list