Re: [PATCH v2] drm/amdgpu: fix multiple memory leaks
From: Markus Elfring
Date: Fri Sep 27 2019 - 12:38:00 EST
> v2: moved the released into goto error handlings
A better version comment should be moved below the triple dashes.
Will the tag âFixesâ be added?
> @@ -393,6 +395,16 @@ static int acp_hw_init(void *handle)
> val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
> cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
> return 0;
> +
> +out4:
> + kfree(i2s_pdata);
> +out3:
> + kfree(adev->acp.acp_res);
> +out2:
> + kfree(adev->acp.acp_cell);
> +out1:
> + kfree(adev->acp.acp_genpd);
> + return ret;
> }
>
> /**
I suggest to reconsider the label selection according to the Linux coding style.
Regards,
Markus