Skip to content
Commit ab1a187b authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI: Check device_attach() return value always



Previously we checked the device_attach() return value only when
CONFIG_BUG=y.  That caused this warning in builds where CONFIG_BUG is not
set:

  drivers/pci/bus.c:237:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable]

Check the return value of device_attach() always and clean up after
failure.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 92e963f5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment