Re: [PATCH] drm/tinydrm: Fix memroy leak in hx8357d_probe
From: Markus Elfring
Date: Sun Oct 27 2019 - 15:56:08 EST
â
> +++ b/drivers/gpu/drm/tiny/hx8357d.c
> @@ -232,44 +232,49 @@ static int hx8357d_probe(struct spi_device *spi)
â
> + goto free_dbidev;
>
> spi_set_drvdata(spi, drm);
I got another development concern here.
Can it make sense to pass the variable âdbidevâ instead of âdrmâ?
â
> +free_dbidev:
> + kfree(dbidev);
â
I became curious if there is a need for such a memory release at another place.
How do you think about to add this function call also to the implementation
of the function âhx8357d_removeâ?
Regards,
Markus