Commit 79f0313b authored by Xiaotian Feng's avatar Xiaotian Feng Committed by Greg Kroah-Hartman

driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails

If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD
uevent to userspace.
Signed-off-by: default avatarXiaotian Feng <dfeng@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4df7b3e0
......@@ -275,9 +275,9 @@ int sysdev_register(struct sys_device *sysdev)
drv->add(sysdev);
}
mutex_unlock(&sysdev_drivers_lock);
kobject_uevent(&sysdev->kobj, KOBJ_ADD);
}
kobject_uevent(&sysdev->kobj, KOBJ_ADD);
return error;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment