* [PATCH RESEND] mtd: denali: fix error handling for devm_ioremap_nocache()
@ 2013-05-03 4:37 Xi Wang
2013-05-29 12:42 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Xi Wang @ 2013-05-03 4:37 UTC (permalink / raw)
To: linux-mtd; +Cc: David Woodhouse, Xi Wang, Artem Bityutskiy
It is incorrect to use `!res' for error handling since `res' must be
non-null. Use the return value `ptr' instead.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
---
drivers/mtd/nand/denali_dt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] mtd: denali: fix error handling for devm_ioremap_nocache()
2013-05-03 4:37 [PATCH RESEND] mtd: denali: fix error handling for devm_ioremap_nocache() Xi Wang
@ 2013-05-29 12:42 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2013-05-29 12:42 UTC (permalink / raw)
To: Xi Wang; +Cc: David Woodhouse, linux-mtd
On Fri, 2013-05-03 at 00:37 -0400, Xi Wang wrote:
> It is incorrect to use `!res' for error handling since `res' must be
> non-null. Use the return value `ptr' instead.
>
> Signed-off-by: Xi Wang <xi.wang@gmail.com>
> ---
This is already fixed upstream:
commit 6c67050ab108bcce2576fa1d7a0557eb0376520a
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date: Mon Mar 18 15:11:11 2013 +0530
mtd: denali_dt: Fix incorrect error check
The return value of devm_ioremap_nocache should be checked here
instead
of res.
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>
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-29 12:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-03 4:37 [PATCH RESEND] mtd: denali: fix error handling for devm_ioremap_nocache() Xi Wang
2013-05-29 12:42 ` Artem Bityutskiy
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.