public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [patch] mtd: denali_dt: harmless case of testing the wrong variable
@ 2013-04-01  6:21 Dan Carpenter
  2013-05-10 13:11 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-04-01  6:21 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Artem Bityutskiy, devicetree-discuss, kernel-janitors,
	Rob Herring, Grant Likely, Bill Pemberton, linux-mtd, Dinh Nguyen

There is a warning message that can't be printed because we test the
wrong variable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index 546f8cb..02988b0 100644
--- a/drivers/mtd/nand/denali_dt.c
+++ b/drivers/mtd/nand/denali_dt.c
@@ -42,7 +42,7 @@ static void __iomem *request_and_map(struct device *dev,
 	}
 
 	ptr = devm_ioremap_nocache(dev, res->start, resource_size(res));
-	if (!res)
+	if (!ptr)
 		dev_err(dev, "ioremap_nocache of %s failed!", res->name);
 
 	return ptr;

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

* Re: [patch] mtd: denali_dt: harmless case of testing the wrong variable
  2013-04-01  6:21 [patch] mtd: denali_dt: harmless case of testing the wrong variable Dan Carpenter
@ 2013-05-10 13:11 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2013-05-10 13:11 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: devicetree-discuss, kernel-janitors, Rob Herring, Grant Likely,
	Bill Pemberton, linux-mtd, David Woodhouse, Dinh Nguyen

On Mon, 2013-04-01 at 09:21 +0300, Dan Carpenter wrote:
> There is a warning message that can't be printed because we test the
> wrong variable.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks Dan, but there is already a similar fix for this in upstream:

commit 6c67050ab108bcce2576fa1d7a0557eb0376520a
Author: Sachin Kamat <sachin.kamat@linaro.org>

-- 
Best Regards,
Artem Bityutskiy

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

end of thread, other threads:[~2013-05-10 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-01  6:21 [patch] mtd: denali_dt: harmless case of testing the wrong variable Dan Carpenter
2013-05-10 13:11 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox