提交 c0db19da 编写于 作者: Y Yuanhan Liu 提交者: Haojian Zhuang

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: NYuanhan Liu <yliu.null@gmail.com>
Signed-off-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
上级 0d7614f0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册