Driver core: Fix error handling in bus_add_driver().
authorCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 18 Feb 2008 16:04:25 +0000 (17:04 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Feb 2008 23:27:07 +0000 (15:27 -0800)
commit0763446429e46fd973f507f79900b95eb8aae2e4
tree9b6b0811c94e59e1e90e0f6a636e2e86b8918c01
parent7199677d2e919edc75d1fb8856c98cd0c1bbcfc5
Driver core: Fix error handling in bus_add_driver().

- If the allocation of ->priv fails, the reference on the bus
  must be dropped.
- If adding the kobject fails, kobject_put must be called to
  clean things up.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/bus.c