* [PATCH 1/1] net: ethernet: ax88796: avoid null pointer dereference
@ 2016-07-31 7:58 Heinrich Schuchardt
2016-08-01 20:43 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31 7:58 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, linux-kernel, Heinrich Schuchardt
If platform_get_resource fails, mem2 is null.
Do not dereference null.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/ethernet/8390/ax88796.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index 5698f53..39ca935 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -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);
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] net: ethernet: ax88796: avoid null pointer dereference
2016-07-31 7:58 [PATCH 1/1] net: ethernet: ax88796: avoid null pointer dereference Heinrich Schuchardt
@ 2016-08-01 20:43 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-01 20:43 UTC (permalink / raw)
To: xypron.glpk; +Cc: f.fainelli, netdev, linux-kernel
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 09:58:44 +0200
> If platform_get_resource fails, mem2 is null.
> Do not dereference null.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-01 20:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 7:58 [PATCH 1/1] net: ethernet: ax88796: avoid null pointer dereference Heinrich Schuchardt
2016-08-01 20:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).