diff options
Diffstat (limited to 'drivers/base/sys.c')
-rw-r--r-- | drivers/base/sys.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 4fbb56bcb1e..358bb0be3c0 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -175,8 +175,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv) | |||
175 | } | 175 | } |
176 | 176 | ||
177 | /* Check whether this driver has already been added to a class. */ | 177 | /* Check whether this driver has already been added to a class. */ |
178 | if ((drv->entry.next != drv->entry.prev) || | 178 | if (drv->entry.next && !list_empty(&drv->entry)) { |
179 | (drv->entry.next != NULL)) { | ||
180 | printk(KERN_WARNING "sysdev: class %s: driver (%p) has already" | 179 | printk(KERN_WARNING "sysdev: class %s: driver (%p) has already" |
181 | " been registered to a class, something is wrong, but " | 180 | " been registered to a class, something is wrong, but " |
182 | "will forge on!\n", cls->name, drv); | 181 | "will forge on!\n", cls->name, drv); |