Commit 3178d2b0 authored by Michal Swiatkowski's avatar Michal Swiatkowski Committed by David S. Miller
Browse files

phy: fix xa_alloc_cyclic() error handling



xa_alloc_cyclic() can return 1, which isn't an error. To prevent
situation when the caller of this function will treat it as no error do
a check only for negative here.

Fixes: 38496878 ("net: phy: Introduce ethernet link topology representation")
Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3614bf90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment