+++ /dev/null
-From 1aae6d5f36b6c14e608ba70cd678786e9fc5bb5e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 7 Feb 2021 22:15:37 +0100
-Subject: driver core: platform: Emit a warning if a remove callback returned
- non-zero
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Uwe Kleine-König <uwe@kleine-koenig.org>
-
-[ Upstream commit e5e1c209788138f33ca6558bf9f572f6904f486d ]
-
-The driver core ignores the return value of a bus' remove callback. However
-a driver returning an error code is a hint that there is a problem,
-probably a driver author who expects that returning e.g. -EBUSY has any
-effect.
-
-The right thing to do would be to make struct platform_driver::remove()
-return void. With the immense number of platform drivers this is however a
-big quest and I hope to prevent at least a few new drivers that return an
-error code here.
-
-Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
-Link: https://lore.kernel.org/r/20210207211537.19992-1-uwe@kleine-koenig.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: cfd67903977b ("PCI: xilinx-nwl: Clean up clock on probe failure/removal")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/base/platform.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/base/platform.c b/drivers/base/platform.c
-index 90166535a5c05..d0b15cbab0ff0 100644
---- a/drivers/base/platform.c
-+++ b/drivers/base/platform.c
-@@ -1305,13 +1305,16 @@ static int platform_remove(struct device *_dev)
- {
- struct platform_driver *drv = to_platform_driver(_dev->driver);
- struct platform_device *dev = to_platform_device(_dev);
-- int ret = 0;
-
-- if (drv->remove)
-- ret = drv->remove(dev);
-+ if (drv->remove) {
-+ int ret = drv->remove(dev);
-+
-+ if (ret)
-+ dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");
-+ }
- dev_pm_domain_detach(_dev, true);
-
-- return ret;
-+ return 0;
- }
-
- static void platform_shutdown(struct device *_dev)
---
-2.43.0
-
pci-xilinx-nwl-fix-register-misspelling.patch
driver-core-platform-reorder-functions.patch
driver-core-platform-use-bus_type-functions.patch
-driver-core-platform-emit-a-warning-if-a-remove-call.patch
platform-provide-a-remove-callback-that-returns-no-v.patch
pci-xilinx-nwl-clean-up-clock-on-probe-failure-remov.patch
rdma-iwcm-fix-warning-at_kernel-workqueue.c-check_fl.patch