diff options
author | Yuanhan Liu <yliu.null@gmail.com> | 2012-08-08 17:02:08 +0800 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-08-10 22:32:24 +0800 |
commit | c0db19dabf138741e078f6391fb132821c0d98b5 (patch) | |
tree | 854bfc3addb1d71e79e31c57f187d9ca4d998606 /arch | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (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')
-rw-r--r-- | 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 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); |