|
|
@@ -322,7 +322,7 @@ static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
|
|
|
umem->pages = kcalloc(umem->npgs, sizeof(*umem->pages), GFP_KERNEL);
|
|
|
if (!umem->pages) {
|
|
|
err = -ENOMEM;
|
|
|
- goto out_account;
|
|
|
+ goto out_pin;
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < umem->npgs; i++)
|
|
|
@@ -330,6 +330,8 @@ static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
+out_pin:
|
|
|
+ xdp_umem_unpin_pages(umem);
|
|
|
out_account:
|
|
|
xdp_umem_unaccount_pages(umem);
|
|
|
return err;
|