Message ID | 20150421093410.GE12098@mwanda (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Dan, On Tue, Apr 21, 2015 at 2:34 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote: > 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> > > diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c > index 3aa46ac..cd8f5f93 100644 > --- a/drivers/thermal/rockchip_thermal.c > +++ b/drivers/thermal/rockchip_thermal.c > @@ -529,7 +529,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; Thanks! :) An obvious fix, but just in case it helps feel free to add: Reviewed-by: Doug Anderson <dianders@chromium.org>
Dan, ? 2015?04?22? 11:07, Caesar Wang ??: > > > ? 2015?04?21? 17:34, Dan Carpenter ??: >> 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> >> >> diff --git a/drivers/thermal/rockchip_thermal.c >> b/drivers/thermal/rockchip_thermal.c >> index 3aa46ac..cd8f5f93 100644 >> --- a/drivers/thermal/rockchip_thermal.c >> +++ b/drivers/thermal/rockchip_thermal.c >> @@ -529,7 +529,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); > Yeah, you are right. > Reviewed-by: Caesar Wang <wxt@rock-chips.com> > Tested-by: Caesar Wang <wxt@rock-chips.com> > Thanks. > > Caesar >> dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n", >> error); >> return error; >> >> >> >
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 3aa46ac..cd8f5f93 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -529,7 +529,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;
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>