i2c: sh_mobile: avoid unused ret variable
authorEugeniu Rosca <erosca@de.adit-jv.com>
Tue, 15 Aug 2017 20:36:24 +0000 (22:36 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 17 Aug 2017 19:52:57 +0000 (21:52 +0200)
Fix smatch warning:
drivers/i2c/busses/i2c-sh_mobile.c:564 \
  sh_mobile_i2c_request_dma_chan() warn: unused return: ret = PTR_ERR()

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-sh_mobile.c

index 2e097d97d258bc67ee799ccef7255ad3872361a1..6f2aaeb7c4fa156dd79274794d1985f40db504a6 100644 (file)
@@ -561,8 +561,8 @@ static struct dma_chan *sh_mobile_i2c_request_dma_chan(struct device *dev,
 
        chan = dma_request_slave_channel_reason(dev, chan_name);
        if (IS_ERR(chan)) {
-               ret = PTR_ERR(chan);
-               dev_dbg(dev, "request_channel failed for %s (%d)\n", chan_name, ret);
+               dev_dbg(dev, "request_channel failed for %s (%ld)\n", chan_name,
+                       PTR_ERR(chan));
                return chan;
        }