power: supply: max14656: remove set but not used 'ret'
authorJason Yan <yanaijie@huawei.com>
Thu, 9 Apr 2020 08:54:01 +0000 (16:54 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 13 Apr 2020 21:01:54 +0000 (23:01 +0200)
Fix the following gcc warning:

drivers/power/supply/max14656_charger_detector.c:142:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]
  int ret = 0;
      ^~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max14656_charger_detector.c

index 3bbb8b4c8ae77bc0838d3b7174aba7bdb7a4c2db..137f9fafce8c7a03ef2b98bff120173cf830be82 100644 (file)
@@ -139,10 +139,9 @@ static void max14656_irq_worker(struct work_struct *work)
 
        u8 buf[REG_TOTAL_NUM];
        u8 chg_type;
-       int ret = 0;
 
-       ret = max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID,
-                                     REG_TOTAL_NUM, buf);
+       max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID,
+                               REG_TOTAL_NUM, buf);
 
        if ((buf[MAX14656_STATUS_1] & STATUS1_VB_VALID_MASK) &&
                (buf[MAX14656_STATUS_1] & STATUS1_CHG_TYPE_MASK)) {