1
0
Fork 0

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>
hifive-unleashed-5.1
SZ Lin 2017-07-29 18:42:36 +08:00 committed by David S. Miller
parent d458f4c5fd
commit e8048b84bb
1 changed files with 2 additions and 2 deletions

View 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;
}