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: 3ad1d171 ("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>
parent
6922110d
Please register or sign in to comment