提交 e8048b84 编写于 作者: S SZ Lin 提交者: David S. Miller

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: NSZ Lin <sz.lin@moxa.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d458f4c5
...@@ -494,7 +494,7 @@ static int moxart_mac_probe(struct platform_device *pdev) ...@@ -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 * priv->tx_desc_base = dma_alloc_coherent(NULL, TX_REG_DESC_SIZE *
TX_DESC_NUM, &priv->tx_base, TX_DESC_NUM, &priv->tx_base,
GFP_DMA | GFP_KERNEL); GFP_DMA | GFP_KERNEL);
if (priv->tx_desc_base == NULL) { if (!priv->tx_desc_base) {
ret = -ENOMEM; ret = -ENOMEM;
goto init_fail; goto init_fail;
} }
...@@ -502,7 +502,7 @@ static int moxart_mac_probe(struct platform_device *pdev) ...@@ -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 * priv->rx_desc_base = dma_alloc_coherent(NULL, RX_REG_DESC_SIZE *
RX_DESC_NUM, &priv->rx_base, RX_DESC_NUM, &priv->rx_base,
GFP_DMA | GFP_KERNEL); GFP_DMA | GFP_KERNEL);
if (priv->rx_desc_base == NULL) { if (!priv->rx_desc_base) {
ret = -ENOMEM; ret = -ENOMEM;
goto init_fail; goto init_fail;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册