netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 3/3] rds/iw_rdma: remove unneeded kfree()
@ 2010-05-27  9:11 Dan Carpenter
  2010-05-28  7:38 ` Andrew Grover
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-27  9:11 UTC (permalink / raw)
  To: Andy Grover; +Cc: David S. Miller, rds-devel, netdev, kernel-janitors

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

Signed-off-by: Dan Carpenter <error27@gmail.com>

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch 3/3] rds/iw_rdma: remove unneeded kfree()
  2010-05-27  9:11 [patch 3/3] rds/iw_rdma: remove unneeded kfree() Dan Carpenter
@ 2010-05-28  7:38 ` Andrew Grover
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Grover @ 2010-05-28  7:38 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Andy Grover, David S. Miller, rds-devel, netdev, kernel-janitors

Thanks Dan, nice catches.

For all three:

Acked-by: Andy Grover <andy.grover@oracle.com>

-- Andy

On Thu, May 27, 2010 at 2:11 AM, Dan Carpenter <error27@gmail.com> wrote:
> The "dma_pages" variable is always NULL at this point so the kfree()
> isn't needed.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
> index 48d5073..742ab6a 100644
> --- a/net/rds/iw_rdma.c
> +++ b/net/rds/iw_rdma.c
> @@ -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);
>  }
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-28  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27  9:11 [patch 3/3] rds/iw_rdma: remove unneeded kfree() Dan Carpenter
2010-05-28  7:38 ` Andrew Grover

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).