提交 a9e94bb8 编写于 作者: G Gregory CLEMENT 提交者: Wolfram Sang

i2c: mv64xxx: Remove useless test before clk_disable_unprepare

clk_disable_unprepare() already checks that the clock pointer is valid.
No need to test it before calling it.
Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 4be49b5d
...@@ -950,9 +950,7 @@ mv64xxx_i2c_probe(struct platform_device *pd) ...@@ -950,9 +950,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
exit_reset: exit_reset:
reset_control_assert(drv_data->rstc); reset_control_assert(drv_data->rstc);
exit_clk: exit_clk:
/* Not all platforms have a clk */ clk_disable_unprepare(drv_data->clk);
if (!IS_ERR(drv_data->clk))
clk_disable_unprepare(drv_data->clk);
return rc; return rc;
} }
...@@ -965,9 +963,7 @@ mv64xxx_i2c_remove(struct platform_device *dev) ...@@ -965,9 +963,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
i2c_del_adapter(&drv_data->adapter); i2c_del_adapter(&drv_data->adapter);
free_irq(drv_data->irq, drv_data); free_irq(drv_data->irq, drv_data);
reset_control_assert(drv_data->rstc); reset_control_assert(drv_data->rstc);
/* Not all platforms have a clk */ clk_disable_unprepare(drv_data->clk);
if (!IS_ERR(drv_data->clk))
clk_disable_unprepare(drv_data->clk);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册