iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare
authorXu Wang <vulab@iscas.ac.cn>
Thu, 31 Dec 2020 08:53:22 +0000 (08:53 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 22 Jan 2021 08:52:07 +0000 (08:52 +0000)
ecause 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/20201231085322.24398-1-vulab@iscas.ac.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-dfsdm-core.c

index 42a7377..bb925a1 100644 (file)
@@ -117,8 +117,7 @@ static void stm32_dfsdm_clk_disable_unprepare(struct stm32_dfsdm *dfsdm)
 {
        struct dfsdm_priv *priv = to_stm32_dfsdm_priv(dfsdm);
 
-       if (priv->aclk)
-               clk_disable_unprepare(priv->aclk);
+       clk_disable_unprepare(priv->aclk);
        clk_disable_unprepare(priv->clk);
 }