summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorLABBE Corentin <clabbe.montjoie@gmail.com>2017-02-08 11:31:16 +0300
committerDavid S. Miller <davem@davemloft.net>2017-02-08 23:11:25 +0300
commit662ec2b7e842c0bb1ef482060497c44afa3f1037 (patch)
treee1c62093fe3efb6335e324a5bb54d045e113d018 /drivers/net/ethernet/stmicro
parentcba920affb7e7326aaea998797c76aa4989c130f (diff)
downloadlinux-662ec2b7e842c0bb1ef482060497c44afa3f1037.tar.xz
net: stmmac: Rewrite two test against NULL value
This patch rewrite two test against NULL value with correct style. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c4
1 files 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 ed813752e23b..cc88bdb929dd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -689,7 +689,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);
@@ -1131,7 +1131,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;