device core: add BUS_NOTIFY_DRIVER_NOT_BOUND notification
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 4 Dec 2015 21:49:17 +0000 (23:49 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Dec 2015 00:25:01 +0000 (01:25 +0100)
commit14b6257a5f3dca3817b0826cb32967e3c2b935c8
treecaf824c65fb41b7678056fda79a40c180001b87c
parent4077a387b79f41e262e9e7332a23b24860407b18
device core: add BUS_NOTIFY_DRIVER_NOT_BOUND notification

The users of BUS_NOTIFY_BIND_DRIVER have no chance to do any cleanup in case of
a probe failure. In the result there might be problems, such as some resources
that had been allocated will continue to be allocated and therefore lead to a
resource leak.

Introduce a new notification to inform the subscriber that ->probe() failed. Do
the same in case of failed device_bind_driver() call.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/dd.c
include/linux/device.h