Hi Mukesh, On Sat 04 Jul 26, 01:08, Mukesh Ojha wrote: > Use the devres-managed devm_of_reserved_mem_device_init() instead of > the manual of_reserved_mem_device_init()/of_reserved_mem_device_release() > pair, letting the device resource manager handle cleanup automatically. Thanks for your work! > Signed-off-by: Mukesh Ojha > --- > drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c > index 444fb53878d1..7b5aa94064a1 100644 > --- a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c > @@ -266,7 +266,7 @@ int cedrus_hw_probe(struct cedrus_dev *dev) > return ret; > } > > - ret = of_reserved_mem_device_init(dev->dev); > + ret = devm_of_reserved_mem_device_init(dev->dev); > if (ret && ret != -ENODEV) { > dev_err(dev->dev, "Failed to reserve memory\n"); > > @@ -341,8 +341,6 @@ int cedrus_hw_probe(struct cedrus_dev *dev) > err_sram: > sunxi_sram_release(dev->dev); > err_mem: Could you also remove this label and switch the goto user to a regular return ret? Thanks! All the best, Paul > - of_reserved_mem_device_release(dev->dev); > - > return ret; > } > > @@ -353,6 +351,4 @@ void cedrus_hw_remove(struct cedrus_dev *dev) > cedrus_hw_suspend(dev->dev); > > sunxi_sram_release(dev->dev); > - > - of_reserved_mem_device_release(dev->dev); > } > -- > 2.53.0 > -- Paul Kocialkowski, Independent contractor - sys-base - https://www.sys-base.io/ Free software developer - https://www.paulk.fr/ Expert in multimedia, graphics and embedded hardware support with Linux.