mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: ethernet: ax88796: avoid null pointer dereference
If platform_get_resource fails, mem2 is null. Do not dereference null. Signed-off-by: Heinrich Schuchardt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
59d53bc213
commit
09d306d79d
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue