Re: [PATCH] mtd: amd76xrom: Fix PCI device reference leak in amd76xrom_init_one()

From: Miquel Raynal

Date: Fri Sep 25 2026 - 10:34:44 EST


On Thu, 17 Sep 2026 10:20:51 +0000, Wentao Liang wrote:
> init_amd76xrom() obtains the PCI device with pci_get_device() and
> hands the reference over to amd76xrom_init_one(), which stores it in
> window->pdev. When reserving the ROM window fails, that function
> returns -EBUSY directly instead of going through amd76xrom_cleanup(),
> so the reference is neither released nor cleared.
>
> Drop the reference and clear window->pdev on that path.
>
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: amd76xrom: Fix PCI device reference leak in amd76xrom_init_one()
commit: 1a122f5fecbabd47b81b1be3f0934f57b78aad42

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl