aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorYuanhan Liu2012-08-08 17:02:08 +0800
committerHaojian Zhuang2012-08-10 22:32:24 +0800
commitc0db19dabf138741e078f6391fb132821c0d98b5 (patch)
tree854bfc3addb1d71e79e31c57f187d9ca4d998606 /arch/arm/mach-mmp
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
ARM: mmp: fix potential NULL dereference
Fix the wrong logic: we should use || instead of && Cc: Leo Yan <leoy@marvell.com> Cc: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Yuanhan Liu <yliu.null@gmail.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/sram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/sram.c b/arch/arm/mach-mmp/sram.c
index 4304f9519372..7e8a5a2e1ec7 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);