Skip to content

Commit

Permalink
net: pci200syn: replace comparison to NULL with "!card"
Browse files Browse the repository at this point in the history
According to the chackpatch.pl, comparison to NULL could
be written "!card".

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Peng Li authored and David S. Miller committed Jun 15, 2021
1 parent f9a03ea commit b928233
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wan/pci200syn.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static int pci200_pci_init_one(struct pci_dev *pdev,
}

card = kzalloc(sizeof(card_t), GFP_KERNEL);
if (card == NULL) {
if (!card) {
pci_release_regions(pdev);
pci_disable_device(pdev);
return -ENOBUFS;
Expand Down Expand Up @@ -310,9 +310,7 @@ static int pci200_pci_init_one(struct pci_dev *pdev,
ramphys = pci_resource_start(pdev,3) & PCI_BASE_ADDRESS_MEM_MASK;
card->rambase = pci_ioremap_bar(pdev, 3);

if (card->plxbase == NULL ||
card->scabase == NULL ||
card->rambase == NULL) {
if (!card->plxbase || !card->scabase || !card->rambase) {
pr_err("ioremap() failed\n");
pci200_pci_remove_one(pdev);
return -EFAULT;
Expand Down

0 comments on commit b928233

Please sign in to comment.