summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/net-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 16baf92f6802..20f1616508b8 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -414,7 +414,7 @@ int netdev_register_sysfs(struct net_device *net)
if ((ret = class_device_register(class_dev)))
goto out;
- for (i = 0; (attr = net_class_attributes[i]); i++) {
+ for (i = 0; (attr = net_class_attributes[i]) != NULL; i++) {
if ((ret = class_device_create_file(class_dev, attr)))
goto out_unreg;
}