i2c: sh_mobile: fix uninitialized var when debug is enabled
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 16 Dec 2014 12:31:26 +0000 (13:31 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 20 Dec 2014 08:28:09 +0000 (09:28 +0100)
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-sh_mobile.c

index a12297e7680ac1f4168204fab6ff12d8fa980fd8..440d5dbc8b5f0c90ca3dd4341cb4a4e4858f791e 100644 (file)
@@ -550,6 +550,7 @@ 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);
                return chan;
        }