From: SZ Lin Date: Sat, 29 Jul 2017 10:42:36 +0000 (+0800) Subject: net: moxa: Fix comparison to NULL could be written with ! X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8048b84bbfd3e7010beb41c251ff5dc27dab955;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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; }