aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-07-06 14:44:02 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-07 20:04:35 +0900
commit000244d3dc1f8114e38fe9ee2d9a0986404d9cbe (patch)
treedd63537ddbfc95239f1a11e67dc0b76560764e40 /include
parentcxgb4: assume flash part size to be 4MB, if it can't be determined (diff)
downloadlinux-dev-000244d3dc1f8114e38fe9ee2d9a0986404d9cbe.tar.xz
linux-dev-000244d3dc1f8114e38fe9ee2d9a0986404d9cbe.zip
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: 4d4fd36126d6 ("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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_bridge.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
index 7843b98e1c6e..c20c7e197d07 100644
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -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