[PATCH] mtd: brcmnand: defer to devm_ioremap_resource() for error checking

Simon Arlott simon at fire.lp0.eu
Thu Dec 10 13:05:36 PST 2015


On 10/12/15 02:33, Brian Norris wrote:
> devm_ioremap_resource() does error checking on the 'res' argument, so
> drop the error check in bcm6368_nand.c.
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> Cc: Simon Arlott <simon at fire.lp0.eu>

Tested-by: Simon Arlott <simon at fire.lp0.eu>

> ---
> Compile tested only
> 
>  drivers/mtd/nand/brcmnand/bcm6368_nand.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/mtd/nand/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/brcmnand/bcm6368_nand.c
> index 7f5359be24f2..34c91b0e1e69 100644
> --- a/drivers/mtd/nand/brcmnand/bcm6368_nand.c
> +++ b/drivers/mtd/nand/brcmnand/bcm6368_nand.c
> @@ -105,9 +105,6 @@ static int bcm6368_nand_probe(struct platform_device *pdev)
>  
>  	res = platform_get_resource_byname(pdev,
>  		IORESOURCE_MEM, "nand-int-base");
> -	if (!res)
> -		return -EINVAL;
> -
>  	priv->base = devm_ioremap_resource(dev, res);
>  	if (IS_ERR(priv->base))
>  		return PTR_ERR(priv->base);
> 


-- 
Simon Arlott



More information about the linux-mtd mailing list