Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -910,6 +910,7 @@ static int ax_probe(struct platform_device *pdev)
	iounmap(ax->map2);

 exit_mem2:
	if (mem2)
		release_mem_region(mem2->start, mem2_size);

 exit_mem1: