Skip to content

Commit

Permalink
net: dsa: Fix dsa_legacy_register() return value
Browse files Browse the repository at this point in the history
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: 2a93c1a ("net: dsa: Allow compiling out legacy support")
Reported-by: Egil Hjelmeland <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ffainelli authored and davem330 committed Jan 3, 2018
1 parent f619b00 commit 21602e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/dsa_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) { }
Expand Down

0 comments on commit 21602e1

Please sign in to comment.