> Am 03.12.23 um 18:16 schrieb Zhipeng Lu:
> > The rdev->pm.dpm.ps allocated by kcalloc should be freed in every
> > following error-handling path. However, in the error-handling of
> > rdev->pm.power_state[i].clock_info the rdev->pm.dpm.ps is not freed,
> > resulting in a memleak in this function.
> Thanks for the fix. As the error handling gets longer and duplicated,
> could you rearrange them like the lima_gem_submit():
> err_out2:
> dma_unmap_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0);
> err_out1:
> kfree(bo->base.sgt);
> bo->base.sgt = NULL;
> err_out0:
> sg_free_table(&sgt