Commit 07fe995f authored by Xu Wang's avatar Xu Wang Committed by Jonathan Cameron
Browse files

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: default avatarXu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20201218094647.1386-1-vulab@iscas.ac.cn


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent cef49e5e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -582,7 +582,6 @@ static int adf4350_probe(struct spi_device *spi)
	if (!IS_ERR(st->reg))
		regulator_disable(st->reg);
error_disable_clk:
	if (clk)
	clk_disable_unprepare(clk);

	return ret;
@@ -599,7 +598,6 @@ static int adf4350_remove(struct spi_device *spi)

	iio_device_unregister(indio_dev);

	if (st->clk)
	clk_disable_unprepare(st->clk);

	if (!IS_ERR(reg))