summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_sysfs_if.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-02-19 18:46:11 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-19 18:46:11 -0500
commitf5c0c6f4299f870f074235fbf552ecf957fc249c (patch)
tree6b46b9c0b271185b6f98fab350c3891042e729b1 /net/bridge/br_sysfs_if.c
parent26736a08ee0fb89a4f09bfb2c9f0805028ff63aa (diff)
parent79c0ef3e85c015b0921a8fd5dd539d1480e9cd6c (diff)
downloadlinux-f5c0c6f4299f870f074235fbf552ecf957fc249c.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/bridge/br_sysfs_if.c')
-rw-r--r--net/bridge/br_sysfs_if.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
index 0254c35b2bf0..126a8ea73c96 100644
--- a/net/bridge/br_sysfs_if.c
+++ b/net/bridge/br_sysfs_if.c
@@ -255,6 +255,9 @@ static ssize_t brport_show(struct kobject *kobj,
struct brport_attribute *brport_attr = to_brport_attr(attr);
struct net_bridge_port *p = to_brport(kobj);
+ if (!brport_attr->show)
+ return -EINVAL;
+
return brport_attr->show(p, buf);
}