diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-12 12:34:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-12 19:49:20 +0300 |
commit | db9107b4972bbcb81ee6bc12f365dbe8684b137c (patch) | |
tree | 27d7880d4441106ab21b4c8cd782480f8f8901fb /net | |
parent | 9d367eddf363553c7668ba92c3b9d187ec4f71f7 (diff) | |
download | linux-db9107b4972bbcb81ee6bc12f365dbe8684b137c.tar.xz |
mdio_bus: NULL dereference on allocation error
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 <dan.carpenter@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions