rds: ib: remove redundant ib_dealloc_fmr
authorZhu Yanjun <yanjun.zhu@oracle.com>
Mon, 13 Mar 2017 05:43:46 +0000 (01:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Mar 2017 06:20:05 +0000 (23:20 -0700)
The function ib_dealloc_fmr will never be called. As such, it should
be removed.

Cc: Joe Jin <joe.jin@oracle.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib_fmr.c

index 4fe8f4fec4eee66c826b5beb5b02ae61d19b483a..249ae1c783cb7ee6f53fb55d596eed4b2780584d 100644 (file)
@@ -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);
 }