* [PATCH 1/1] dma: imx-dma: Remove redundant NULL check
@ 2013-09-02 7:51 Sachin Kamat
2013-09-02 8:19 ` Sascha Hauer
2013-09-02 10:46 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-09-02 7:51 UTC (permalink / raw)
To: linux-kernel; +Cc: vinod.koul, djbw, sachin.kamat, Sascha Hauer
kfree on a NULL pointer is a no-op. Null pointer check is
not necessary.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/dma/imx-dma.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index ff2aab9..78f8ca5 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -805,10 +805,8 @@ static void imxdma_free_chan_resources(struct dma_chan *chan)
}
INIT_LIST_HEAD(&imxdmac->ld_free);
- if (imxdmac->sg_list) {
- kfree(imxdmac->sg_list);
- imxdmac->sg_list = NULL;
- }
+ kfree(imxdmac->sg_list);
+ imxdmac->sg_list = NULL;
}
static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] dma: imx-dma: Remove redundant NULL check
2013-09-02 7:51 [PATCH 1/1] dma: imx-dma: Remove redundant NULL check Sachin Kamat
@ 2013-09-02 8:19 ` Sascha Hauer
2013-09-02 10:46 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2013-09-02 8:19 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, vinod.koul, djbw
On Mon, Sep 02, 2013 at 01:21:18PM +0530, Sachin Kamat wrote:
> kfree on a NULL pointer is a no-op. Null pointer check is
> not necessary.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha
> ---
> drivers/dma/imx-dma.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index ff2aab9..78f8ca5 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -805,10 +805,8 @@ static void imxdma_free_chan_resources(struct dma_chan *chan)
> }
> INIT_LIST_HEAD(&imxdmac->ld_free);
>
> - if (imxdmac->sg_list) {
> - kfree(imxdmac->sg_list);
> - imxdmac->sg_list = NULL;
> - }
> + kfree(imxdmac->sg_list);
> + imxdmac->sg_list = NULL;
> }
>
> static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
> --
> 1.7.9.5
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] dma: imx-dma: Remove redundant NULL check
2013-09-02 7:51 [PATCH 1/1] dma: imx-dma: Remove redundant NULL check Sachin Kamat
2013-09-02 8:19 ` Sascha Hauer
@ 2013-09-02 10:46 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2013-09-02 10:46 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, djbw, Sascha Hauer
On Mon, Sep 02, 2013 at 01:21:18PM +0530, Sachin Kamat wrote:
> kfree on a NULL pointer is a no-op. Null pointer check is
> not necessary.
Applied, thanks
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-02 11:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 7:51 [PATCH 1/1] dma: imx-dma: Remove redundant NULL check Sachin Kamat
2013-09-02 8:19 ` Sascha Hauer
2013-09-02 10:46 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox