mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
cef49e5ea1
commit
07fe995f94
@@ -582,8 +582,7 @@ error_disable_reg:
|
|||||||
if (!IS_ERR(st->reg))
|
if (!IS_ERR(st->reg))
|
||||||
regulator_disable(st->reg);
|
regulator_disable(st->reg);
|
||||||
error_disable_clk:
|
error_disable_clk:
|
||||||
if (clk)
|
clk_disable_unprepare(clk);
|
||||||
clk_disable_unprepare(clk);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -599,8 +598,7 @@ static int adf4350_remove(struct spi_device *spi)
|
|||||||
|
|
||||||
iio_device_unregister(indio_dev);
|
iio_device_unregister(indio_dev);
|
||||||
|
|
||||||
if (st->clk)
|
clk_disable_unprepare(st->clk);
|
||||||
clk_disable_unprepare(st->clk);
|
|
||||||
|
|
||||||
if (!IS_ERR(reg))
|
if (!IS_ERR(reg))
|
||||||
regulator_disable(reg);
|
regulator_disable(reg);
|
||||||
|
Reference in New Issue
Block a user