Commit 336d781b authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: wan: replace comparison to NULL with "!card"

According to the chackpatch.pl, comparison to NULL could
be written "!card".
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 87feef1c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment