mana: fix leaking pci resource problem detaching mana deivces

Fixing the error messages when detaching the mana gdma devices
showed in dmesg: "Device leaked memory resources".

Reported by:	NetApp
MFC after:	3 days
Sponsored by:	Microsoft
This commit is contained in:
Wei Hu 2024-02-13 09:21:14 +00:00
parent b00271ceea
commit 47e99e5bc5

View file

@ -1562,7 +1562,7 @@ alloc_bar_out:
static void
mana_gd_free_pci_res(struct gdma_context *gc)
{
if (!gc || gc->dev)
if (!gc || !gc->dev)
return;
if (gc->bar0 != NULL) {