summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-12-29 11:05:45 -0800
committerDavid S. Miller <davem@davemloft.net>2018-01-02 21:52:48 -0500
commit21602e1a5578925f610155a0bcf056d1ea9de964 (patch)
treef3a4cbfccb0b5bee0f01930e1c81661605d734ee /net/dsa
parentf619b009009f5b9fb9ee82b93f789b66cb333e36 (diff)
downloadlinux-21602e1a5578925f610155a0bcf056d1ea9de964.tar.gz
linux-21602e1a5578925f610155a0bcf056d1ea9de964.tar.bz2
linux-21602e1a5578925f610155a0bcf056d1ea9de964.zip
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 <privat@egil-hjelmeland.no> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa_priv.h2
1 files changed, 1 insertions, 1 deletions
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) { }