Driver core: Fix device_add_attrs() error code path
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 12 Dec 2013 05:11:02 +0000 (06:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2013 23:50:16 +0000 (15:50 -0800)
If the addition of dev_attr_online fails, device_add_attrs() should
remove device attribute groups as well as type and class attribute
groups before returning an error code.  Make that happen.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c

Simple merge