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>
This commit is contained in:
parent
0d7614f09c
commit
c0db19dabf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue