Re: [PATCH -next] spi: tegra20-slink: fix return value check in tegra_slink_init_dma_param()

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

 



On 12/13/2013 09:42 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> In case of error, the function dma_request_slave_channel() returns
> NULL pointer not ERR_PTR(). The IS_ERR() test in the return value

> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c

>  	dma_chan = dma_request_slave_channel(tspi->dev,
>  					     dma_to_memory ? "rx" : "tx");
> -	if (IS_ERR(dma_chan)) {
...
> +	if (!dma_chan) {

The code should be calling dma_request_slave_channel_or_reason() rather
than dma_request_slave_channel(). Dan Williams provided a patch to fix
this, which I've now applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux