power: supply: sbs-battery: remove unchecked return var
authorWolfram Sang <wsa@the-dreams.de>
Sat, 28 Oct 2017 22:45:59 +0000 (00:45 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 28 Oct 2017 22:45:59 +0000 (00:45 +0200)
Since the return value is not checked anyhow, we don't need to store it.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/power/supply/sbs-battery.c

index fb61da3..83d7b41 100644 (file)
@@ -556,7 +556,7 @@ static int sbs_get_battery_serial_number(struct i2c_client *client,
        if (ret < 0)
                return ret;
 
-       ret = sprintf(sbs_serial, "%04x", ret);
+       sprintf(sbs_serial, "%04x", ret);
        val->strval = sbs_serial;
 
        return 0;