RE: [PATCH] net: enetc: Use pci_release_region() to release some resources

From: Claudiu Manoil
Date: Fri May 27 2022 - 13:51:32 EST


> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> Sent: Friday, May 27, 2022 12:26 PM
[...]
> Subject: [PATCH] net: enetc: Use pci_release_region() to release some
> resources
>
> Some resources are allocated using pci_request_region().
> It is more straightforward to release them with pci_release_region().
>
> Fixes: 231ece36f50d ("enetc: Add mdio bus driver for the PCIe MDIO
> endpoint")
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> This patch is speculative, mainly based on the inconsistency between some
> function's names.
> Using pci_request_mem_regions() would also have things look consistent.
>
> Review with care.
> ---

Since the external MDIO registers are located in BAR 0 of the PCIe endpoint device,
the driver requests specifically the BAR 0 mem region and should release the same
region. So the fix is valid. Thanks.

Reviewed-by: Claudiu Manoil <claudiu.manoil@xxxxxxx>