All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-mtd@lists.infradead.org
Cc: sachin.kamat@linaro.org, artem.bityutskiy@linux.intel.com,
	dwmw2@infradead.org, dinguyen@altera.com, dedekind1@gmail.com
Subject: [PATCH 3/4] mtd: denali_dt: Change return value to fix smatch warning
Date: Mon, 18 Mar 2013 15:11:13 +0530	[thread overview]
Message-ID: <1363599674-26933-3-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1363599674-26933-1-git-send-email-sachin.kamat@linaro.org>

platform_get_irq() also returns -ENXIO upon failure.
Use it instead of hardcoded return type.

Fixes the following smatch warning:
drivers/mtd/nand/denali_dt.c:93 denali_dt_probe() info:
why not propagate 'denali->irq' from platform_get_irq() instead of (-6)?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/denali_dt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index eb68979..067a505 100644
--- a/drivers/mtd/nand/denali_dt.c
+++ b/drivers/mtd/nand/denali_dt.c
@@ -90,7 +90,7 @@ static int denali_dt_probe(struct platform_device *ofdev)
 	denali->irq = platform_get_irq(ofdev, 0);
 	if (denali->irq < 0) {
 		dev_err(&ofdev->dev, "no irq defined\n");
-		return -ENXIO;
+		return denali->irq;
 	}
 
 	denali->flash_reg = request_and_map(&ofdev->dev, denali_reg);
-- 
1.7.4.1

  parent reply	other threads:[~2013-03-18  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18  9:41 [PATCH 1/4] mtd: denali_dt: Fix incorrect error check Sachin Kamat
2013-03-18  9:41 ` [PATCH 2/4] mtd: denali_dt: Use module_platform_driver() Sachin Kamat
2013-03-18  9:41 ` Sachin Kamat [this message]
2013-03-18  9:41 ` [PATCH 4/4] mtd: denali_dt: Remove redundant use of of_match_ptr Sachin Kamat
2013-03-19 16:08   ` Dinh Nguyen
2013-04-05 12:04 ` [PATCH 1/4] mtd: denali_dt: Fix incorrect error check 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=1363599674-26933-3-git-send-email-sachin.kamat@linaro.org \
    --to=sachin.kamat@linaro.org \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=dedekind1@gmail.com \
    --cc=dinguyen@altera.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.