]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: ksz: ksz8863_smi_probe: set proper return value for ksz_switch_alloc()
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 29 Apr 2021 11:08:33 +0000 (13:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Apr 2021 22:54:35 +0000 (15:54 -0700)
commit6be2a5dc99a301e5bd9c6a05f3f13d4c420f6c0c
tree404945eafbfc36baae0c7a4c616dca0d35f43d6a
parent1c03d0d5c3594d88dc8c3ea9b7fd0c1092f4e02e
net: dsa: ksz: ksz8863_smi_probe: set proper return value for ksz_switch_alloc()

ksz_switch_alloc() will return NULL only if allocation is failed. So,
the proper return value is -ENOMEM.

Fixes: 2555630ed86f ("net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support")
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