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] [day] [month] [year] [list]
Date:	Sun, 20 Jan 2013 05:55:11 -0800
From:	Vinod Koul <vinod.koul@...el.com>
To:	Cong Ding <dinggnu@...il.com>
Cc:	Dan Williams <djbw@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma: remove unnecessary null pointer check in
 mmp_pdma.c

On Tue, Jan 15, 2013 at 01:19:48AM +0100, Cong Ding wrote:
> the pointer cfg is dereferenced in line 594, so it's no reason to check null
> again in line 620.
> 
> Signed-off-by: Cong Ding <dinggnu@...il.com>
> ---
>  drivers/dma/mmp_pdma.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
> index c6d98c0..81d7b89 100644
> --- a/drivers/dma/mmp_pdma.c
> +++ b/drivers/dma/mmp_pdma.c
> @@ -617,10 +617,8 @@ static int mmp_pdma_control(struct dma_chan *dchan, enum dma_ctrl_cmd cmd,
>  		else if (maxburst == 32)
>  			chan->dcmd |= DCMD_BURST32;
>  
> -		if (cfg) {
> -			chan->dir = cfg->direction;
> -			chan->drcmr = cfg->slave_id;
> -		}
> +		chan->dir = cfg->direction;
> +		chan->drcmr = cfg->slave_id;
>  		chan->dev_addr = addr;
>  		break;
>  	default:
Applied, Thanks

--
~Vinod
--
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