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

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

Fixes: 2555630ed86f ("net: dsa: microchip: Add Microchip KSZ8863 SMI 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/ksz8863_smi.c