Thread (3 messages) flat view 3 messages, 3 authors, 2016-01-12

Re: [patch] mdio_bus: NULL dereference on allocation error

From: David Miller <davem@davemloft.net>
Date: 2016-01-12 19:31:23
Also in: kernel-janitors, lkml

From: Dan Carpenter <redacted>
Date: Tue, 12 Jan 2016 12:34:36 +0300
If bus = kzalloc() fails then we end up dereferencing bus when we do
"bus->irq[i] = PHY_POLL;".  The code is a little simpler if we reverse
the NULL check and return directly on failure.

Fixes: e7f4dc3536a4 ('mdio: Move allocation of interrupts into core')
Signed-off-by: Dan Carpenter <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help