]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: ksz: ksz8795_spi_probe: fix possible NULL pointer dereference
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 29 Apr 2021 11:08:32 +0000 (13:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Apr 2021 22:54:35 +0000 (15:54 -0700)
commit1c03d0d5c3594d88dc8c3ea9b7fd0c1092f4e02e
tree4e16aa73127f594967c7dee39a5782bb139afc3f
parenta0257dc8b304d96937490004d158c8126f41debe
net: dsa: ksz: ksz8795_spi_probe: fix possible NULL pointer dereference

Fix possible NULL pointer dereference in case devm_kzalloc() failed to
allocate memory

Fixes: 9dd2cf8dc0bd ("net: dsa: microchip: Add Microchip KSZ8863 SPI based driver support")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8795_spi.c