thermal: rockchip: fix an error code
authorKamal Mostafa <kamal@canonical.com>
Wed, 17 Jun 2015 22:23:00 +0000 (15:23 -0700)
committerGerrit Code Review <gerrit@rock-chips.com>
Wed, 21 Oct 2015 10:17:37 +0000 (18:17 +0800)
3.19.8-ckt2 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 0d0a2bf6ed4b489eef9a84450b3d90e6e001ce63 upstream.

There is a copy and paste bug, "->clk" vs "->pclk", so we return the
wrong error code here.

Change-Id: I3ef649ce940016fd9214ea924b243a07bdc58248
Fixes: cbac8f639437 ('thermal: rockchip: add driver for thermal')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
drivers/thermal/rockchip_thermal.c

index 6c63571f005e9fee3f44a44e3f6a4463414f8e88..202bfe3db12c548d6125a5d68148df7273bb99b1 100755 (executable)
@@ -920,7 +920,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;