rds/iw_rdma: remove unneeded kfree()
PATCH 3/3 rds/iw_rdma: remove unneeded kfree()
The "dma_pages" variable is always NULL at this point so the kfree() isn't needed.
net/rds/iw_rdma.c +0 -1
@@ -334,7 +334,6 @@ static u64 *rds_iw_map_scatterlist(struct rds_iw_device *rds_iwdev, out_unmap:ib_dma_unmap_sg (rds_iwdev->dev, sg->list, sg->len,DMA_BIDIRECTIONAL ); sg->dma_len =0 ; -kfree (dma_pages);return ERR_PTR (ret); }
Thanks Dan, nice catches.
For all three:
-- Andy
Quoted 17 lines · Dan Carpenter
The "
dma_pages" variable is always NULL at this point so thekfree()isn't needed.Signed-off-by Dan Carpenter <[email protected]>net/rds/iw_rdma.c +0
-0@@ -334,7 +334,6 @@ static u64 *rds_iw_map_scatterlist(struct rds_iw_device *rds_iwdev,out_unmap:
ib_dma_unmap_sg(rds_iwdev->dev,sg->list,sg->len,DMA_BIDIRECTIONAL);sg->dma_len= 0;
-kfree(dma_pages);
returnERR_PTR(ret);
}
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html