[COMMON] i2c: exynos5: Fix prevent defect
authorKyungwoo Kang <kwoo.kang@samsung.com>
Thu, 7 Sep 2017 09:56:03 +0000 (18:56 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
CID: 197277

Fix prevent defcet, unsigned comparrison which return
value is never true.

Change-Id: If3890084cc46b01b5fd6dbb467b760113f393b3c
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/i2c/busses/i2c-exynos5.c

index 04fa9d0e5d76ff67a465fe5bde5bcf8222937759..8214ea00d9d807d90dbe86f8e549d159f6b2df84 100644 (file)
@@ -363,7 +363,8 @@ static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
  */
 static int exynos5_i2c_set_timing(struct exynos5_i2c *i2c, bool hs_timings)
 {
-       unsigned int ipclk, ret;
+       int ret;
+       unsigned int ipclk;
        unsigned int op_clk = (mode == HSI2C_HIGH_SPD) ?
                i2c->hs_clock : i2c->fs_clock;