PCI: iproc: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 21 Mar 2023 19:32:01 +0000 (20:32 +0100)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Sat, 24 Jun 2023 14:12:36 +0000 (14:12 +0000)
commit6f1c0a046048ec647299c5f9a135002393941c99
tree50930e7e6ab8205b4dc0768a5994493969b84c8f
parent9a285fbbb591428de0cde7f553130e7c728a2e19
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>
drivers/pci/controller/pcie-iproc-platform.c
drivers/pci/controller/pcie-iproc.c
drivers/pci/controller/pcie-iproc.h