Skip to content

Commit

Permalink
driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_…
Browse files Browse the repository at this point in the history
…add fails

If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD
uevent to userspace.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Xiaotian Feng authored and Greg Kroah-Hartman committed Jul 28, 2009
1 parent 4df7b3e commit 79f0313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 79f0313

Please sign in to comment.