[PATCH v2] perf/dwc_pcie: Fix PCI device reference leak in probe

Markus Elfring Markus.Elfring at web.de
Thu Aug 20 07:16:07 PDT 2026


…
> Declare the looked-up device with __free(pci_dev_put), so the temporary
> reference is released on every return path. Keeping the reference scoped
> to the whole probe also covers all later uses of the device during
> initialization.
…

Is there a need to reduce the scope for such a local variable further
by using a corresponding compound statement?

Regards,
Markus



More information about the linux-arm-kernel mailing list