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: <ebd3a5e7-ee98-71b7-4978-6e6570f19497@st.com>
Date:   Tue, 31 Jan 2017 11:07:41 +0100
From:   Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:     Corentin Labbe <clabbe.montjoie@...il.com>,
        <alexandre.torgue@...com>, <netdev@...r.kernel.org>
CC:     <davem@...emloft.net>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 11/17] net: stmmac: Rewrite two test against NULL value

On 1/31/2017 10:11 AM, Corentin Labbe wrote:
> This patch rewrite two test against NULL value with correct style.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@...il.com>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@...com>

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index b0154d5..2df36bd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -700,7 +700,7 @@ static void stmmac_adjust_link(struct net_device *dev)
>  	int new_state = 0;
>  	unsigned int fc = priv->flow_ctrl, pause_time = priv->pause;
>
> -	if (phydev == NULL)
> +	if (!phydev)
>  		return;
>
>  	spin_lock_irqsave(&priv->lock, flags);
> @@ -1143,7 +1143,7 @@ static void dma_free_tx_skbufs(struct stmmac_priv *priv)
>  						 DMA_TO_DEVICE);
>  		}
>
> -		if (priv->tx_skbuff[i] != NULL) {
> +		if (priv->tx_skbuff[i]) {
>  			dev_kfree_skb_any(priv->tx_skbuff[i]);
>  			priv->tx_skbuff[i] = NULL;
>  			priv->tx_skbuff_dma[i].buf = 0;
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ