Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove it
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: Qii Wang <qii.wang@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
return 0;
err_arb:
- if (i2c->have_pmic)
- clk_disable_unprepare(i2c->clk_pmic);
+ clk_disable_unprepare(i2c->clk_pmic);
err_pmic:
clk_disable_unprepare(i2c->clk_main);
err_main:
static void mtk_i2c_clock_disable(struct mtk_i2c *i2c)
{
- if (i2c->clk_arb)
- clk_disable_unprepare(i2c->clk_arb);
+ clk_disable_unprepare(i2c->clk_arb);
- if (i2c->have_pmic)
- clk_disable_unprepare(i2c->clk_pmic);
+ clk_disable_unprepare(i2c->clk_pmic);
clk_disable_unprepare(i2c->clk_main);
clk_disable_unprepare(i2c->clk_dma);