lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130902081914.GN30088@pengutronix.de>
Date:	Mon, 2 Sep 2013 10:19:14 +0200
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	linux-kernel@...r.kernel.org, vinod.koul@...el.com, djbw@...com
Subject: Re: [PATCH 1/1] dma: imx-dma: Remove redundant NULL check

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@...aro.org>
> Cc: Sascha Hauer <s.hauer@...gutronix.de>

Acked-by: Sascha Hauer <s.hauer@...gutronix.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 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ