diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 4fbb56bcb1eefbd60b5a189963e1e742ef794865..358bb0be3c0838b9233bae7b1eab1cc2b05ef1e6 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) } /* Check whether this driver has already been added to a class. */ - if ((drv->entry.next != drv->entry.prev) || - (drv->entry.next != NULL)) { + if (drv->entry.next && !list_empty(&drv->entry)) { printk(KERN_WARNING "sysdev: class %s: driver (%p) has already" " been registered to a class, something is wrong, but " "will forge on!\n", cls->name, drv);