diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-03-21 20:32:01 +0100 |
---|---|---|
committer | Krzysztof Wilczyński <kwilczynski@kernel.org> | 2023-06-24 16:12:36 +0200 |
commit | 6f1c0a046048ec647299c5f9a135002393941c99 (patch) | |
tree | 50930e7e6ab8205b4dc0768a5994493969b84c8f /drivers/pci/controller/pcie-iproc.h | |
parent | PCI: hisi-error: Convert to platform remove callback returning void (diff) | |
download | linux-6f1c0a046048ec647299c5f9a135002393941c99.tar.xz linux-6f1c0a046048ec647299c5f9a135002393941c99.zip |
PCI: iproc: 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.
The iproc driver always returns 0, it's just a bit hidden. So make
iproc_pcie_remove() return void instead of always zero and convert the
platform driver to the alternative remove callback that returns void and
eventually replaces the int returning callback.
Link: https://lore.kernel.org/linux-pci/20230321193208.366561-9-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'drivers/pci/controller/pcie-iproc.h')
-rw-r--r-- | drivers/pci/controller/pcie-iproc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-iproc.h b/drivers/pci/controller/pcie-iproc.h index dcca315897c8..969ded03b8c2 100644 --- a/drivers/pci/controller/pcie-iproc.h +++ b/drivers/pci/controller/pcie-iproc.h @@ -111,7 +111,7 @@ struct iproc_pcie { }; int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res); -int iproc_pcie_remove(struct iproc_pcie *pcie); +void iproc_pcie_remove(struct iproc_pcie *pcie); int iproc_pcie_shutdown(struct iproc_pcie *pcie); #ifdef CONFIG_PCIE_IPROC_MSI |