Re: [PATCH 2/2] spi: sun4i: Fix memory leak on device removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux