Skip to content

Commit

Permalink
iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on err…
Browse files Browse the repository at this point in the history
…or in rockchip_saradc_resume

commit 560c6b9 upstream.

Fix the missing clk_disable_unprepare() of info->pclk
before return from rockchip_saradc_resume in the error
handling case when fails to prepare and enable info->clk.

Suggested-by: Robin Murphy <robin.murphy@arm.com>
Fixes: 44d6f2e ("iio: adc: add driver for Rockchip saradc")
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201103120743.110662-1-miaoqinglang@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Qinglang Miao authored and gregkh committed Dec 30, 2020
1 parent 2adb3f8 commit 160ec8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/rockchip_saradc.c
Expand Up @@ -462,7 +462,7 @@ static int rockchip_saradc_resume(struct device *dev)

ret = clk_prepare_enable(info->clk);
if (ret)
return ret;
clk_disable_unprepare(info->pclk);

return ret;
}
Expand Down

0 comments on commit 160ec8a

Please sign in to comment.