diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-18 05:41:13 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 09:04:20 -0400 |
commit | 2f2ff14c2760cd1db5dd05afddae9a5d9709047a (patch) | |
tree | 2785e94bf34c60047c71bcd52bbee7200dd90c4d /drivers/mtd/nand | |
parent | 82fc812ca458a98767b659171a43244dc1ddaf82 (diff) |
mtd: denali_dt: Change return value to fix smatch warning
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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | 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 eb68979ec382..067a505aa624 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) | |||
90 | denali->irq = platform_get_irq(ofdev, 0); | 90 | denali->irq = platform_get_irq(ofdev, 0); |
91 | if (denali->irq < 0) { | 91 | if (denali->irq < 0) { |
92 | dev_err(&ofdev->dev, "no irq defined\n"); | 92 | dev_err(&ofdev->dev, "no irq defined\n"); |
93 | return -ENXIO; | 93 | return denali->irq; |
94 | } | 94 | } |
95 | 95 | ||
96 | denali->flash_reg = request_and_map(&ofdev->dev, denali_reg); | 96 | denali->flash_reg = request_and_map(&ofdev->dev, denali_reg); |