public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	devicetree-discuss@lists.ozlabs.org,
	kernel-janitors@vger.kernel.org,
	Rob Herring <rob.herring@calxeda.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Bill Pemberton <wfp5p@virginia.edu>,
	linux-mtd@lists.infradead.org, Dinh Nguyen <dinguyen@altera.com>
Subject: [patch] mtd: denali_dt: harmless case of testing the wrong variable
Date: Mon, 1 Apr 2013 09:21:51 +0300	[thread overview]
Message-ID: <20130401062151.GA5197@longonot.mountain> (raw)

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;

             reply	other threads:[~2013-04-01  6:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  6:21 Dan Carpenter [this message]
2013-05-10 13:11 ` [patch] mtd: denali_dt: harmless case of testing the wrong variable Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130401062151.GA5197@longonot.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dinguyen@altera.com \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rob.herring@calxeda.com \
    --cc=wfp5p@virginia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox