mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
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: 60a3647600
("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>
This commit is contained in:
parent
ba46b576a7
commit
d4eecfb28b
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ static int ksz8863_smi_probe(struct mdio_device *mdiodev)
|
|||
|
||||
dev = ksz_switch_alloc(&mdiodev->dev, ksz8);
|
||||
if (!dev)
|
||||
return -EINVAL;
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ksz8863_regmap_config); i++) {
|
||||
rc = ksz8863_regmap_config[i];
|
||||
|
|
Loading…
Add table
Reference in a new issue