linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: brcmnand: defer to devm_ioremap_resource() for error checking
@ 2015-12-10  2:33 Brian Norris
  2015-12-10 21:05 ` Simon Arlott
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Norris @ 2015-12-10  2:33 UTC (permalink / raw)
  To: linux-mtd
  Cc: Brian Norris, Kamal Dasu, bcm-kernel-feedback-list, Simon Arlott

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@gmail.com>
Cc: Simon Arlott <simon@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);
-- 
2.6.0.rc2.230.g3dd15c0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: brcmnand: defer to devm_ioremap_resource() for error checking
  2015-12-10  2:33 [PATCH] mtd: brcmnand: defer to devm_ioremap_resource() for error checking Brian Norris
@ 2015-12-10 21:05 ` Simon Arlott
  2015-12-10 21:09   ` Brian Norris
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Arlott @ 2015-12-10 21:05 UTC (permalink / raw)
  To: Brian Norris, linux-mtd; +Cc: Kamal Dasu, bcm-kernel-feedback-list

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@gmail.com>
> Cc: Simon Arlott <simon@fire.lp0.eu>

Tested-by: Simon Arlott <simon@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: brcmnand: defer to devm_ioremap_resource() for error checking
  2015-12-10 21:05 ` Simon Arlott
@ 2015-12-10 21:09   ` Brian Norris
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Norris @ 2015-12-10 21:09 UTC (permalink / raw)
  To: Simon Arlott; +Cc: linux-mtd, Kamal Dasu, bcm-kernel-feedback-list

On Thu, Dec 10, 2015 at 09:05:36PM +0000, Simon Arlott wrote:
> 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@gmail.com>
> > Cc: Simon Arlott <simon@fire.lp0.eu>
> 
> Tested-by: Simon Arlott <simon@fire.lp0.eu>

Applied to l2-mtd.git

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-10 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10  2:33 [PATCH] mtd: brcmnand: defer to devm_ioremap_resource() for error checking Brian Norris
2015-12-10 21:05 ` Simon Arlott
2015-12-10 21:09   ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).