diff options
author | SZ Lin <sz.lin@moxa.com> | 2017-07-29 18:42:36 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-29 14:02:07 -0700 |
commit | e8048b84bbfd3e7010beb41c251ff5dc27dab955 (patch) | |
tree | b592ce693785fbbc6cf6a446be4f5b6d1878d93a /drivers/net/ethernet/moxa | |
parent | d458f4c5fd55ae921ac6f3bf2c169da8d2379b07 (diff) | |
download | linux-e8048b84bbfd3e7010beb41c251ff5dc27dab955.tar.bz2 |
net: moxa: Fix comparison to NULL could be written with !
Fixed coding style for null comparisons in moxart_ether driver
to be more consistent with the rest of the kernel coding style
Signed-off-by: SZ Lin <sz.lin@moxa.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/moxa')
-rw-r--r-- | drivers/net/ethernet/moxa/moxart_ether.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 9997e72103d5..1d6384873393 100644 --- a/drivers/net/ethernet/moxa/moxart_ether.c +++ b/drivers/net/ethernet/moxa/moxart_ether.c @@ -494,7 +494,7 @@ static int moxart_mac_probe(struct platform_device *pdev) priv->tx_desc_base = dma_alloc_coherent(NULL, TX_REG_DESC_SIZE * TX_DESC_NUM, &priv->tx_base, GFP_DMA | GFP_KERNEL); - if (priv->tx_desc_base == NULL) { + if (!priv->tx_desc_base) { ret = -ENOMEM; goto init_fail; } @@ -502,7 +502,7 @@ static int moxart_mac_probe(struct platform_device *pdev) priv->rx_desc_base = dma_alloc_coherent(NULL, RX_REG_DESC_SIZE * RX_DESC_NUM, &priv->rx_base, GFP_DMA | GFP_KERNEL); - if (priv->rx_desc_base == NULL) { + if (!priv->rx_desc_base) { ret = -ENOMEM; goto init_fail; } |