Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753830AbdG2KoB (ORCPT ); Sat, 29 Jul 2017 06:44:01 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34794 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753780AbdG2Kn4 (ORCPT ); Sat, 29 Jul 2017 06:43:56 -0400 From: SZ Lin To: davem@davemloft.net Cc: jarod@redhat.com, jonas.jensen@gmail.com, edumazet@google.com, bhumirks@gmail.com, tklauser@distanz.ch, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, SZ Lin Subject: [PATCH 3/6] net: moxa: Fix comparison to NULL could be written with ! Date: Sat, 29 Jul 2017 18:42:36 +0800 Message-Id: <20170729104239.14999-4-sz.lin@moxa.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170729104239.14999-1-sz.lin@moxa.com> References: <20170729104239.14999-1-sz.lin@moxa.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1148 Lines: 32 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 --- drivers/net/ethernet/moxa/moxart_ether.c | 4 ++-- 1 file 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; } -- 2.13.3