net: dsa: Fix dsa_legacy_register() return value
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 29 Dec 2017 19:05:45 +0000 (11:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 02:52:48 +0000 (21:52 -0500)
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 <privat@egil-hjelmeland.no>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa_priv.h

index b03665e8fb4eecc8533129741b264202370f3893..cefb0c3c6d51edcebd5d9ac83c6c1d94983c3890 100644 (file)
@@ -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) { }