bridge: check brport attr show in brport_show
[pandora-kernel.git] / net / bridge / br_sysfs_if.c
index 6229b62..d1f6604 100644 (file)
@@ -196,6 +196,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);
 }