Skip to content

Commit b928233

Browse files
321lipengdavem330
authored andcommitted
net: pci200syn: replace comparison to NULL with "!card"
According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f9a03ea commit b928233

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/net/wan/pci200syn.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static int pci200_pci_init_one(struct pci_dev *pdev,
279279
}
280280

281281
card = kzalloc(sizeof(card_t), GFP_KERNEL);
282-
if (card == NULL) {
282+
if (!card) {
283283
pci_release_regions(pdev);
284284
pci_disable_device(pdev);
285285
return -ENOBUFS;
@@ -310,9 +310,7 @@ static int pci200_pci_init_one(struct pci_dev *pdev,
310310
ramphys = pci_resource_start(pdev,3) & PCI_BASE_ADDRESS_MEM_MASK;
311311
card->rambase = pci_ioremap_bar(pdev, 3);
312312

313-
if (card->plxbase == NULL ||
314-
card->scabase == NULL ||
315-
card->rambase == NULL) {
313+
if (!card->plxbase || !card->scabase || !card->rambase) {
316314
pr_err("ioremap() failed\n");
317315
pci200_pci_remove_one(pdev);
318316
return -EFAULT;

0 commit comments

Comments
 (0)