Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 000244d3 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

net: bridge: fix br_vlan_get_{pvid,info} return values



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: 4d4fd361 ("net: bridge: Publish bridge accessor functions")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 843789f6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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