Re: [PATCH RESEND] dma: ti-dma-crossbar: Fix checking return value of devm_ioremap_resource

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

 



On 08/04/2015 03:39 AM, Axel Lin wrote:
> devm_ioremap_resource returns ERR_PTR on failure.
> 
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>

Oops, I don't know how I missed this, thanks!

Acked-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>

> ---
> Hi,
> This trivial patch was sent on http://www.spinics.net/lists/dmaengine/msg05241.html 
> No response so far, so here is a resend.

I can not see this in my mailbox.

> 
>  drivers/dma/ti-dma-crossbar.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
> index 24f5ca2..5e261d1 100644
> --- a/drivers/dma/ti-dma-crossbar.c
> +++ b/drivers/dma/ti-dma-crossbar.c
> @@ -139,12 +139,9 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
>  		xbar->safe_val = (u16)safe_val;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res)
> -		return -ENODEV;
> -
>  	iomem = devm_ioremap_resource(&pdev->dev, res);
> -	if (!iomem)
> -		return -ENOMEM;
> +	if (IS_ERR(iomem))
> +		return PTR_ERR(iomem);
>  
>  	xbar->iomem = iomem;
>  
> 


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



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux