1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00
Johan Hovold 1260cbcffa lib/genalloc: fix device leak in of_gen_pool_get()
Make sure to drop the reference taken when looking up the genpool platform
device in of_gen_pool_get() before returning the pool.

Note that holding a reference to a device does typically not prevent its
devres managed resources from being released so there is no point in
keeping the reference.

Link: https://lkml.kernel.org/r/20250924080207.18006-1-johan@kernel.org
Fixes: 9375db07adea ("genalloc: add devres support, allow to find a managed pool by device")
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: <stable@vger.kernel.org>	[3.10+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-28 11:36:13 -07:00
..
2024-12-12 18:26:32 +01:00
2025-07-31 16:52:32 -07:00
2025-03-16 22:30:49 -07:00
2025-04-11 17:32:38 -07:00
2025-09-13 17:32:47 -07:00
2025-04-11 17:32:37 -07:00
2025-09-13 17:32:45 -07:00
2025-07-08 19:11:57 -04:00
2025-03-25 10:18:31 -03:00
2025-01-12 20:21:15 -08:00
2025-06-30 09:31:57 -07:00
2025-01-14 19:45:35 +01:00
2025-07-13 16:38:24 -07:00
2025-03-17 12:17:00 -07:00
2025-05-11 17:54:04 -07:00
2025-07-09 22:42:05 -07:00
2025-03-25 10:18:31 -03:00
2025-08-02 12:01:41 -07:00
2025-08-04 10:54:36 -07:00
2024-12-09 13:48:29 -08:00
2025-08-02 12:01:37 -07:00