patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.14 01/15] iio: accel: fxls8962af: Fix wakeup source leaks on device unbind
@ 2025-05-12 18:03 Sasha Levin
  2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 02/15] iio: adc: qcom-spmi-iadc: " Sasha Levin
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Sasha Levin @ 2025-05-12 18:03 UTC (permalink / raw)
  To: patches, stable
  Cc: Krzysztof Kozlowski, Jonathan Cameron, Sasha Levin, jic23, sean,
	andriy.shevchenko, Frank.Li, nuno.sa, haibo.chen, jstephan,
	tgamblin, han.xu, peterz, linux-iio, linux-kernel

From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

[ Upstream commit 0cd34d98dfd4f2b596415b8f12faf7b946613458 ]

Device can be unbound, so driver must also release memory for the wakeup
source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250406-b4-device-wakeup-leak-iio-v1-1-2d7d322a4a93@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iio/accel/fxls8962af-core.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
index 987212a7c038e..a0ae30c86687a 100644
--- a/drivers/iio/accel/fxls8962af-core.c
+++ b/drivers/iio/accel/fxls8962af-core.c
@@ -1229,8 +1229,11 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq)
 	if (ret)
 		return ret;
 
-	if (device_property_read_bool(dev, "wakeup-source"))
-		device_init_wakeup(dev, true);
+	if (device_property_read_bool(dev, "wakeup-source")) {
+		ret = devm_device_init_wakeup(dev);
+		if (ret)
+			return dev_err_probe(dev, ret, "Failed to init wakeup\n");
+	}
 
 	return devm_iio_device_register(dev, indio_dev);
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-05-20 14:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 18:03 [PATCH AUTOSEL 6.14 01/15] iio: accel: fxls8962af: Fix wakeup source leaks on device unbind Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 02/15] iio: adc: qcom-spmi-iadc: " Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 03/15] iio: imu: st_lsm6dsx: " Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 04/15] btrfs: compression: adjust cb->compressed_folios allocation type Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 05/15] btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 06/15] btrfs: handle empty eb->folios in num_extent_folios() Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 07/15] btrfs: avoid NULL pointer dereference if no valid csum tree Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 08/15] usb: xhci: Don't trust the EP Context cycle bit when moving HW dequeue Sasha Levin
2025-05-12 21:16   ` Michał Pecio
2025-05-20 14:04     ` Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 09/15] tools: ynl-gen: validate 0 len strings from kernel Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 10/15] block: only update request sector if needed Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 11/15] wifi: iwlwifi: add support for Killer on MTL Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 12/15] x86/Kconfig: make CFI_AUTO_DEFAULT depend on !RUST or Rust >= 1.88 Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 13/15] xenbus: Allow PVH dom0 a non-local xenstore Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 14/15] drm/amd/display: Call FP Protect Before Mode Programming/Mode Support Sasha Levin
2025-05-12 18:03 ` [PATCH AUTOSEL 6.14 15/15] __legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).