git: 47e99e5bc5bc - main - mana: fix leaking pci resource problem detaching mana deivces
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 13 Feb 2024 09:39:39 UTC
The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=47e99e5bc5bcfa621fe6a3e62386f227c47e8cff commit 47e99e5bc5bcfa621fe6a3e62386f227c47e8cff Author: Wei Hu <whu@FreeBSD.org> AuthorDate: 2024-02-13 09:21:14 +0000 Commit: Wei Hu <whu@FreeBSD.org> CommitDate: 2024-02-13 09:38:31 +0000 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 --- sys/dev/mana/gdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index e955d9e1d304..13f8a30762b1 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -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) {