i2c: rcar: avoid unused ret variable
authorEugeniu Rosca <erosca@de.adit-jv.com>
Tue, 15 Aug 2017 20:36:23 +0000 (22:36 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 17 Aug 2017 19:52:36 +0000 (21:52 +0200)
Fix smatch warning:
drivers/i2c/busses/i2c-rcar.c:628 \
  rcar_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-rcar.c

index 93c1a54981df08c775c8735e23e6c8ecdc2ef482..15d764afec3b29db443e5c225153270181fb2137 100644 (file)
@@ -625,9 +625,8 @@ static struct dma_chan *rcar_i2c_request_dma_chan(struct device *dev,
 
        chan = dma_request_chan(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;
        }