From: Florian Fainelli Date: Fri, 29 Dec 2017 19:05:45 +0000 (-0800) Subject: net: dsa: Fix dsa_legacy_register() return value X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=21602e1a5578925f610155a0bcf056d1ea9de964;p=openwrt%2Fstaging%2Fblogic.git net: dsa: Fix dsa_legacy_register() return value We need to make the dsa_legacy_register() stub return 0 in order for dsa_init_module() to successfully register and continue registering the ETH_P_XDSA packet handler. Fixes: 2a93c1a3651f ("net: dsa: Allow compiling out legacy support") Reported-by: Egil Hjelmeland Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index b03665e8fb4e..cefb0c3c6d51 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -103,7 +103,7 @@ void dsa_legacy_unregister(void); #else static inline int dsa_legacy_register(void) { - return -ENODEV; + return 0; } static inline void dsa_legacy_unregister(void) { }