diff options
author | Uwe Kleine-König <[email protected]> | 2023-10-20 11:21:07 +0200 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2023-11-20 15:53:14 -0600 |
commit | d9dcdb4531fe39ce48919ef8c2c9369ee49f3ad2 (patch) | |
tree | 7284a0dedf376e30e8dfc2f33697b204a68a0f75 /drivers/pci/controller/pci-host-generic.c | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) |
PCI: host-generic: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
pci_host_common_remove() returned zero unconditionally. With that converted
to return void instead, the generic pci host driver can be switched to
.remove_new() trivially.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Will Deacon <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-host-generic.c')
-rw-r--r-- | drivers/pci/controller/pci-host-generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pci-host-generic.c b/drivers/pci/controller/pci-host-generic.c index 63865aeb636b..41cb6a057f6e 100644 --- a/drivers/pci/controller/pci-host-generic.c +++ b/drivers/pci/controller/pci-host-generic.c @@ -82,7 +82,7 @@ static struct platform_driver gen_pci_driver = { .of_match_table = gen_pci_of_match, }, .probe = pci_host_common_probe, - .remove = pci_host_common_remove, + .remove_new = pci_host_common_remove, }; module_platform_driver(gen_pci_driver); |