Skip to content

Commit

Permalink
net: lpc-enet: fix badzero.cocci warnings
Browse files Browse the repository at this point in the history
drivers/net/ethernet/nxp/lpc_eth.c:1316:31-32: WARNING comparing pointer to 0

 Compare pointer-typed values to NULL rather than 0

Semantic patch information:
 This makes an effort to choose between !x and x == NULL.  !x is used
 if it has previously been used with the function used to initialize x.
 This relies on type information.  More type information can be obtained
 using the option -all_includes and the option -I to specify an
 include path.

Generated by: scripts/coccinelle/null/badzero.cocci

Link: https://lore.kernel.org/r/[email protected]
Fixes: e42016eb3844 ("net: lpc-enet: allow compile testing")
Signed-off-by: kbuild test robot <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
intel-lab-lkp authored and arndb committed Aug 15, 2019
1 parent ecca1a6 commit 772775c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/nxp/lpc_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
}
}

if (pldat->dma_buff_base_v == 0) {
if (pldat->dma_buff_base_v == NULL) {
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret)
goto err_out_free_irq;
Expand Down

0 comments on commit 772775c

Please sign in to comment.