diff options
author | Johan Hovold <johan@kernel.org> | 2025-09-24 10:02:07 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-28 11:36:13 -0700 |
commit | 1260cbcffa608219fc9188a6cbe9c45a300ef8b5 (patch) | |
tree | 3b3a83b74c33ba23f634b6b9e39df6c1580f88fc /rust/helpers/processor.c | |
parent | 1daf37592a050da046a03f78b20abb2a91f6d934 (diff) |
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>
Diffstat (limited to 'rust/helpers/processor.c')
0 files changed, 0 insertions, 0 deletions