diff options
author | Peng Li <lipeng321@huawei.com> | 2021-05-24 17:47:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-25 00:07:38 +0300 |
commit | 336d781bd952beb1a043b786ced65883d67c34bd (patch) | |
tree | a5b7bc9f0952f2519ec3a48635481dccb5af4ba6 /drivers | |
parent | 87feef1cfbbe9233c53d5c4ff03277b70b58c458 (diff) | |
download | linux-336d781bd952beb1a043b786ced65883d67c34bd.tar.xz |
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 <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wan/wanxl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index a5f0aae30e0c..5a89b6d4d92e 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; } |