提交 09d306d7 编写于 作者: X xypron.glpk@gmx.de 提交者: 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: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册