Re: [PATCH] net: xilinx: fix potential NULL dereference in temac_probe()

2020-07-14 Thread Markus Elfring
> If you use devm_ioremap_resource() you can remove the !res check > entirely which would be equally acceptable as a fix. Would you like to use the wrapper function “devm_platform_get_and_ioremap_resource” then? https://elixir.bootlin.com/linux/v5.8-rc4/source/drivers/base/platform.c#L66

Re: [PATCH] net: xilinx: fix potential NULL dereference in temac_probe()

2020-07-13 Thread Florian Fainelli
On 7/13/2020 7:23 PM, Xu Wang wrote: > platform_get_resource() may return NULL, add proper > check to avoid potential NULL dereferencing. > > Signed-off-by: Xu Wang > --- If you use devm_ioremap_resource() you can remove the !res check entirely which would be equally acceptable as a fix. >

[PATCH] net: xilinx: fix potential NULL dereference in temac_probe()

2020-07-13 Thread Xu Wang
platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. Signed-off-by: Xu Wang --- drivers/net/ethernet/xilinx/ll_temac_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c