linux-stable/drivers/net/pcs
Wong Vee Khee 2cad5d2ed1 net: pcs: xpcs: fix error handling on failed to allocate memory
Drivers such as sja1105 and stmmac that call xpcs_create() expects an
error returned by the pcs-xpcs module, but this was not the case on
failed to allocate memory.

Fixed this by returning an -ENOMEM instead of a NULL pointer.

Fixes: 3ad1d17154 ("net: dsa: sja1105: migrate to xpcs for SGMII")
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20210810085812.1808466-1-vee.khee.wong@linux.intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-11 14:50:54 -07:00
..
Kconfig net: pcs-xpcs: depend on MDIO_BUS instead of selecting it 2020-10-16 16:54:11 -07:00
Makefile net: pcs: xpcs: add support for NXP SJA1105 2021-06-11 13:43:56 -07:00
pcs-lynx.c net: pcs: add pcs-lynx 1000BASE-X support 2021-02-06 14:35:21 -08:00
pcs-xpcs-nxp.c net: pcs: xpcs: Fix a less than zero u16 comparison error 2021-06-17 11:14:06 -07:00
pcs-xpcs.c net: pcs: xpcs: fix error handling on failed to allocate memory 2021-08-11 14:50:54 -07:00
pcs-xpcs.h net: pcs: xpcs: add support for NXP SJA1110 2021-06-11 13:43:56 -07:00