* [PATCH] ARM: mmp: fix potential NULL dereference
@ 2012-08-08 9:02 Yuanhan Liu
2012-08-10 14:29 ` Haojian Zhuang
0 siblings, 1 reply; 2+ messages in thread
From: Yuanhan Liu @ 2012-08-08 9:02 UTC (permalink / raw)
To: linux-arm-kernel
Fix the wrong logic: we should use || instead of &&
Cc: Leo Yan <leoy@marvell.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Yuanhan Liu <yliu.null@gmail.com>
---
arch/arm/mach-mmp/sram.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-mmp/sram.c b/arch/arm/mach-mmp/sram.c
index 4304f95..7e8a5a2 100644
--- a/arch/arm/mach-mmp/sram.c
+++ b/arch/arm/mach-mmp/sram.c
@@ -68,7 +68,7 @@ static int __devinit sram_probe(struct platform_device *pdev)
struct resource *res;
int ret = 0;
- if (!pdata && !pdata->pool_name)
+ if (!pdata || !pdata->pool_name)
return -ENODEV;
info = kzalloc(sizeof(*info), GFP_KERNEL);
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: mmp: fix potential NULL dereference
2012-08-08 9:02 [PATCH] ARM: mmp: fix potential NULL dereference Yuanhan Liu
@ 2012-08-10 14:29 ` Haojian Zhuang
0 siblings, 0 replies; 2+ messages in thread
From: Haojian Zhuang @ 2012-08-10 14:29 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 8, 2012 at 5:02 PM, Yuanhan Liu <yliu.null@gmail.com> wrote:
> Fix the wrong logic: we should use || instead of &&
>
> Cc: Leo Yan <leoy@marvell.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: Eric Miao <eric.y.miao@gmail.com>
> Signed-off-by: Yuanhan Liu <yliu.null@gmail.com>
> ---
> arch/arm/mach-mmp/sram.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
Applied.
Thanks
Haojian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-10 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-08 9:02 [PATCH] ARM: mmp: fix potential NULL dereference Yuanhan Liu
2012-08-10 14:29 ` Haojian Zhuang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).