Skip to contentSkip to conversation

rds/iw_rdma: remove unneeded kfree()

PATCH In review Dan Carpenter 2 participants 2 messages May 27, 2010 – May 28, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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
index 48d5073..742ab6a 100644
@@ -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);
 }
 
Acked-by Andy Grover on v1 3/3
#1 lore raw

Thanks Dan, nice catches.

For all three:

-- Andy

Quoted 17 lines · Dan Carpenter

The "dma_pages" variable is always NULL at this point so the kfree() isn't needed.

net/rds/iw_rdma.c +0 -0
index 48d5073..742ab6a 100644
@@ -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);
 }

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