Re: [PATCH] i2c: sh_mobile: fix uninitialized var when debug is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wolfram,

Thank you for tha patch.

On Saturday 20 December 2014 09:36:42 Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-sh_mobile.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/busses/i2c-sh_mobile.c
> b/drivers/i2c/busses/i2c-sh_mobile.c index a12297e7680a..440d5dbc8b5f
> 100644
> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c
> @@ -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);

You could just do

		dev_dbg(dev, "request_channel failed for %s (%d)\n", chan_name,
			PTR_ERR(chan));

but that's up to you.

Acked-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

>  		return chan;
>  	}

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux