diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-18 22:40:04 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-18 22:40:04 +0100 |
commit | 71150d226564686ef32d15d29edfd18346f6e929 (patch) | |
tree | c591756e18763e1a935b52b7464e5d7b4a77d6ac /drivers/ata | |
parent | 38f6b38dbb0896511c509fbb6ceabbedbee8e87d (diff) | |
download | linux-71150d226564686ef32d15d29edfd18346f6e929.tar.bz2 |
PNP: Avoid leaving unregistered device objects in lists
pnp_register_protocol() and __pnp_add_device() both have a problem
that if device_register() fails, the objects they create will be left
in the lists they have been put one beforehand. Unfortunately, that
is not handled by the callers of those routines either, so in case
of a device registration errors the PNP bus type's data structures
will end up in an inconsistent state.
Make pnp_register_protocol() and __pnp_add_device() remove the
objects from the lists if device registration fails.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/ata')
0 files changed, 0 insertions, 0 deletions