summaryrefslogtreecommitdiff
path: root/drivers/iio/frequency
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2020-12-18 09:46:47 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-01-09 21:52:46 +0000
commit07fe995f942b63d7ee21cb70b0be08b53bd03db9 (patch)
treeb467e9a687ad06c5dff51dd041988312c07c0185 /drivers/iio/frequency
parentcef49e5ea1171c366e0df6d919292e585db3de55 (diff)
iio: frequency: adf4350: Remove redundant null check before clk_disable_unprepare
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20201218094647.1386-1-vulab@iscas.ac.cn Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/frequency')
-rw-r--r--drivers/iio/frequency/adf4350.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index 82c050a3899d..1462a6a5bc6d 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -582,8 +582,7 @@ error_disable_reg:
if (!IS_ERR(st->reg))
regulator_disable(st->reg);
error_disable_clk:
- if (clk)
- clk_disable_unprepare(clk);
+ clk_disable_unprepare(clk);
return ret;
}
@@ -599,8 +598,7 @@ static int adf4350_remove(struct spi_device *spi)
iio_device_unregister(indio_dev);
- if (st->clk)
- clk_disable_unprepare(st->clk);
+ clk_disable_unprepare(st->clk);
if (!IS_ERR(reg))
regulator_disable(reg);