[PATCH 0/5] remoteproc: Use devm_of_reserved_mem_device_init()
Mukesh Ojha
mukesh.ojha at oss.qualcomm.com
Wed Sep 2 12:33:13 PDT 2026
Several remoteproc drivers manually allocate a reserved memory region via
of_reserved_mem_device_init() and then pair it with an explicit release in
the remove path. This is error-prone: if any error path between init and
release is taken, the region is leaked for the lifetime of the driver, and
the pattern must be duplicated for every driver that needs this.
devm_of_reserved_mem_device_init() was recently introduced to handle the
cleanup automatically via the devres framework. Convert the affected
remoteproc drivers to use it, removing the manual release calls and any
wrapper devres actions that were added to work around the missing helper.
Mukesh Ojha (5):
remoteproc: da8xx: Use devm_of_reserved_mem_device_init()
remoteproc: keystone: Use devm_of_reserved_mem_device_init()
remoteproc: omap: Use devm_of_reserved_mem_device_init()
remoteproc: mtk_scp: Use devm_of_reserved_mem_device_init()
remoteproc: ti_k3: Use devm_of_reserved_mem_device_init()
drivers/remoteproc/da8xx_remoteproc.c | 10 +---------
drivers/remoteproc/keystone_remoteproc.c | 16 ++--------------
drivers/remoteproc/omap_remoteproc.c | 13 +------------
drivers/remoteproc/mtk_scp.c | 3 +--
drivers/remoteproc/ti_k3_common.c | 13 +------------
drivers/remoteproc/ti_k3_common.h | 1 -
6 files changed, 6 insertions(+), 50 deletions(-)
--
2.34.1
More information about the linux-arm-kernel
mailing list