summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2018-01-16 17:35:38 +0100
committerWolfram Sang <wsa@the-dreams.de>2018-01-26 18:49:45 +0100
commita9e94bb80ea6d53745eb5ca86597696735565fb3 (patch)
treebd8d7e76ea84a4a5ca062d991d9f9a9e806d2b65 /drivers/i2c
parent4be49b5d652e8b81ba8d019727ebd8cafd7ab4ac (diff)
downloadlinux-a9e94bb80ea6d53745eb5ca86597696735565fb3.tar.bz2
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: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index a832c45276a4..f69066266faa 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -950,9 +950,7 @@ exit_free_irq:
exit_reset:
reset_control_assert(drv_data->rstc);
exit_clk:
- /* Not all platforms have a clk */
- if (!IS_ERR(drv_data->clk))
- clk_disable_unprepare(drv_data->clk);
+ clk_disable_unprepare(drv_data->clk);
return rc;
}
@@ -965,9 +963,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
i2c_del_adapter(&drv_data->adapter);
free_irq(drv_data->irq, drv_data);
reset_control_assert(drv_data->rstc);
- /* Not all platforms have a clk */
- if (!IS_ERR(drv_data->clk))
- clk_disable_unprepare(drv_data->clk);
+ clk_disable_unprepare(drv_data->clk);
return 0;
}