ARM: mmp: fix potential NULL dereference
Subsystems (3)
PATCH 1/1 ARM: mmp: fix potential NULL dereference
Fix the wrong logic: we should use || instead of &&
Cc Leo Yan <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Eric Miao <[email protected]>
Signed-off-by Yuanhan Liu <[email protected]>
--- arch/arm/mach-mmp/sram.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-mmp/sram.c +1 -1
@@ -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 );
Signature · 1 line
1.7.4.4
Haojian Zhuang
AppliedPATCH 1/1 ARM: mmp: fix potential NULL dereference
Quoted 10 lines · Yuanhan Liu
Fix the wrong logic: we should use || instead of &&
Cc Leo Yan <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Eric Miao <[email protected]>Signed-off-by Yuanhan Liu <[email protected]>--- arch/arm/mach-mmp/sram.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied.
Thanks
Haojian