Message ID | 1489383828-7699-3-git-send-email-yanjun.zhu@oracle.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/net/rds/ib_fmr.c b/net/rds/ib_fmr.c index 4fe8f4f..249ae1c 100644 --- a/net/rds/ib_fmr.c +++ b/net/rds/ib_fmr.c @@ -78,12 +78,9 @@ struct rds_ib_mr *rds_ib_alloc_fmr(struct rds_ib_device *rds_ibdev, int npages) return ibmr; out_no_cigar: - if (ibmr) { - if (fmr->fmr) - ib_dealloc_fmr(fmr->fmr); - kfree(ibmr); - } + kfree(ibmr); atomic_dec(&pool->item_count); + return ERR_PTR(err); }