Messages in this thread | | | Date | Mon, 2 Oct 2023 14:02:17 +0100 | From | Mark Brown <> | Subject | Re: [PATCH 2/2] spi: sun4i: Fix memory leak on device removal |
| |
On Mon, Oct 02, 2023 at 02:29:59PM +0800, Woody Zhang wrote:
> Call spi_master_put to free the spi_master structure on device removal > and driver detachment.
> static void sun4i_spi_remove(struct platform_device *pdev) > { > + struct spi_master *master = dev_get_drvdata(&pdev->dev); > + > pm_runtime_force_suspend(&pdev->dev); > + spi_master_put(master); > }
This is just obviously buggy, it doesn't match the registration at all. [unhandled content-type:application/pgp-signature] | |