memory: ti-aemif: fix a potential NULL-pointer dereference
PATCH 1/1 memory: ti-aemif: fix a potential NULL-pointer dereference
From: Bartosz Golaszewski <[email protected]>
Platform data pointer may be NULL. We check it everywhere but in one place. Fix it.
--- drivers/memory/ti-aemif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memory/ti-aemif.c +1 -1
@@ -411,7 +411,7 @@ static int aemif_probe(struct platform_device *pdev)if (ret <0 ) goto error; } - }else { + }else if (pdata) {for (i =0 ; i < pdata->num_sub_devices; i++) { pdata->sub_devices[i].dev.parent = dev; ret =platform_device_register (&pdata->sub_devices[i]);
Signature · 1 line
2.18.0
Hi Arnd, Olof,
Quoted 5 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Platform data pointer may be NULL. We check it everywhere but in one place. Fix it.
Quoted 8 lines
Fixes 8af70cd2ca50 ("memory: aemif: add support for board files")Reported-by Dan Carpenter <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/memory/ti-aemif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Will you be able to push this via drivers-soc fixes ?
Regards,
Santosh
Olof Johansson
AppliedQuoted 16 lines · Santosh Shilimkar
Hi Arnd, Olof,
Quoted 5 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Platform data pointer may be NULL. We check it everywhere but in one place. Fix it.
Quoted 8 lines
Fixes 8af70cd2ca50 ("memory: aemif: add support for board files")Reported-by Dan Carpenter <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/memory/ti-aemif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line
Will you be able to push this via drivers-soc fixes ?
Applied to fixes.
-Olof
Quoted 17 lines · Olof Johansson
Quoted 16 lines · Santosh Shilimkar
Hi Arnd, Olof,
Quoted 13 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Platform data pointer may be NULL. We check it everywhere but in one place. Fix it.
Fixes 8af70cd2ca50 ("memory: aemif: add support for board files")Reported-by Dan Carpenter <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/memory/ti-aemif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Quoted 1 line
Will you be able to push this via drivers-soc fixes ?
Applied to fixes.
Thanks Olof !!
Regards,
Santosh