iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_s...
authorQinglang Miao <miaoqinglang@huawei.com>
Tue, 3 Nov 2020 12:07:43 +0000 (20:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:47:10 +0000 (13:47 +0100)
commit75eeb06f57923a48bf3c8fa8944cb181d155ff77
tree26b3f6901178c53c8ec4af3b7f5a83e2bb25810b
parent894d77998dab7c4db32042c5e80480c8aada1013
iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume

commit 560c6b914c6ec7d9d9a69fddbb5bf3bf71433e8b 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: 44d6f2ef94f9 ("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>
drivers/iio/adc/rockchip_saradc.c