net: moxa: Fix comparison to NULL could be written with !
authorSZ Lin <sz.lin@moxa.com>
Sat, 29 Jul 2017 10:42:36 +0000 (18:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Jul 2017 21:02:07 +0000 (14:02 -0700)
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>
drivers/net/ethernet/moxa/moxart_ether.c

index 9997e72103d587db7372c8700d38b27f6f413c42..1d6384873393cd0c65a0c8d671f58aa5175cf0e1 100644 (file)
@@ -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;
        }