Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f92d74c1 authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by Bjorn Helgaas
Browse files

PCI: Warn on driver probe return value greater than zero



Ages ago, drivers could return values greater than zero from their probe
function and this would be regarded as success.

But after f3ec4f87 ("PCI: change device runtime PM settings for probe
and remove") and 967577b0 ("PCI/PM: Keep runtime PM enabled for unbound
PCI devices"), we set dev->driver to NULL if the driver's probe function
returns a value greater than zero.

__pci_device_probe() treats this as success, and drivers can still mostly
work even with dev->driver == NULL, but PCI power management doesn't work,
and we don't call the driver's remove function on rmmod.

To help catch these driver problems, issue a warning in this case.

[bhelgaas: changelog]
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent fbeeb822
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment