aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorYuanhan Liu <yliu.null@gmail.com>2012-08-08 05:02:08 -0400
committerHaojian Zhuang <haojian.zhuang@gmail.com>2012-08-10 10:32:24 -0400
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)
68 struct resource *res; 68 struct resource *res;
69 int ret = 0; 69 int ret = 0;
70 70
71 if (!pdata && !pdata->pool_name) 71 if (!pdata || !pdata->pool_name)
72 return -ENODEV; 72 return -ENODEV;
73 73
74 info = kzalloc(sizeof(*info), GFP_KERNEL); 74 info = kzalloc(sizeof(*info), GFP_KERNEL);