Driver core: Fix device_add_attrs() error code path
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: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NToshi Kani <toshi.kani@hp.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录