From: Peng Li Date: Mon, 24 May 2021 14:47:15 +0000 (+0800) Subject: net: wan: replace comparison to NULL with "!card" X-Git-Tag: accepted/tizen/unified/20230118.172025~6942^2~462^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=336d781bd952beb1a043b786ced65883d67c34bd;p=platform%2Fkernel%2Flinux-rpi.git net: wan: replace comparison to NULL with "!card" According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller --- diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index a5f0aae..5a89b6d 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -600,7 +600,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, } card = kzalloc(struct_size(card, ports, ports), GFP_KERNEL); - if (card == NULL) { + if (!card) { pci_release_regions(pdev); pci_disable_device(pdev); return -ENOBUFS; @@ -612,7 +612,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, card->status = dma_alloc_coherent(&pdev->dev, sizeof(struct card_status), &card->status_address, GFP_KERNEL); - if (card->status == NULL) { + if (!card->status) { wanxl_pci_remove_one(pdev); return -ENOBUFS; }