Skip to content

Commit

Permalink
net: moxa: Fix comparison to NULL could be written with !
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
SZ Lin authored and David S. Miller committed Jul 29, 2017
1 parent d458f4c commit e8048b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/moxa/moxart_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,15 @@ 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;
}

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;
}
Expand Down

0 comments on commit e8048b8

Please sign in to comment.