Skip to content

Commit

Permalink
net: bridge: fix br_vlan_get_{pvid,info} return values
Browse files Browse the repository at this point in the history
These two functions return the regular -EINVAL failure in the normal
code path, but return a nonstandard '-1' error otherwise, which gets
interpreted as -EPERM.

Let's change it to -EINVAL for the dummy functions as well.

Fixes: 4d4fd36 ("net: bridge: Publish bridge accessor functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnd Bergmann authored and David S. Miller committed Jul 7, 2018
1 parent 843789f commit 000244d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/if_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev)

static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid)
{
return -1;
return -EINVAL;
}

static inline int br_vlan_get_info(const struct net_device *dev, u16 vid,
struct bridge_vlan_info *p_vinfo)
{
return -1;
return -EINVAL;
}
#endif

Expand Down

0 comments on commit 000244d

Please sign in to comment.