Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0db19da authored by Yuanhan Liu's avatar Yuanhan Liu Committed by Haojian Zhuang
Browse files

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: default avatarYuanhan Liu <yliu.null@gmail.com>
Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
parent 0d7614f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);