diff options
author | Yuanhan Liu <yliu.null@gmail.com> | 2012-08-08 11:02:08 +0200 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-08-10 16:32:24 +0200 |
commit | c0db19dabf138741e078f6391fb132821c0d98b5 (patch) | |
tree | 854bfc3addb1d71e79e31c57f187d9ca4d998606 /arch/arm | |
parent | Linux 3.6-rc1 (diff) | |
download | linux-c0db19dabf138741e078f6391fb132821c0d98b5.tar.xz linux-c0db19dabf138741e078f6391fb132821c0d98b5.zip |
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')
-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); |