Commit 0d0a2bf6ed4b489eef9a84450b3d90e6e001ce63

Authored by Dan Carpenter
Committed by Zhang Rui
1 parent d818611388

thermal: rockchip: fix an error code

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@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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/thermal/rockchip_thermal.c
... ... @@ -529,7 +529,7 @@
529 529  
530 530 thermal->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
531 531 if (IS_ERR(thermal->pclk)) {
532   - error = PTR_ERR(thermal->clk);
  532 + error = PTR_ERR(thermal->pclk);
533 533 dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n",
534 534 error);
535 535 return error;