Commit 09d306d7 authored by xypron.glpk@gmx.de's avatar xypron.glpk@gmx.de Committed by David S. Miller

net: ethernet: ax88796: avoid null pointer dereference

If platform_get_resource fails, mem2 is null.
Do not dereference null.
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 59d53bc2
......@@ -910,7 +910,8 @@ static int ax_probe(struct platform_device *pdev)
iounmap(ax->map2);
exit_mem2:
release_mem_region(mem2->start, mem2_size);
if (mem2)
release_mem_region(mem2->start, mem2_size);
exit_mem1:
iounmap(ei_local->mem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment