Skip to contentSkip to conversation

bcm43xx-softmac: fix warning from ignoring returned value from pci_enable_device

PATCH In review Larry Finger 3 participants 3 messages Sep 28, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm43xx-softmac: fix warning from ignoring returned value from pci_enable_device

Linus's tree now has a configuration option that prints a warning whenever the returned value of any routine is ignored. This patch fixes the only such warning for bcm43xx.

---

drivers/net/wireless/bcm43xx/bcm43xx_main.c +5 -1
Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
@@ -4208,7 +4207,11 @@ static int bcm43xx_resume(struct pci_dev
 	dprintk(KERN_INFO PFX "Resuming...\n");
 
 	pci_set_power_state(pdev, 0);
-	pci_enable_device(pdev);
+	err = pci_enable_device(pdev);
+	if (err) {
+		printk(KERN_ERR PFX "Failure with pci_enable_device!\n");
+		return err;
+	}
 	pci_restore_state(pdev);
 
 	bcm43xx_chipset_attach(bcm);

---

#1 lore raw
Quoted 4 lines · Larry Finger

Linus's tree now has a configuration option that prints a warning whenever the returned value of any routine is ignored. This patch fixes the only such warning for bcm43xx.

Can you tell me how to make this check please so I can check my code in the kernel? I could look it up but obviously you can tell me quickly :-)

Regards,

Ian

Signature · 7 lines
Ian McDonald
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.com
WAND Network Research Group
Department of Computer Science
University of Waikato
New Zealand
#2 lore raw
Quoted 8 lines · Ian McDonald
Quoted 4 lines · Larry Finger

Linus's tree now has a configuration option that prints a warning whenever the returned value of any routine is ignored. This patch fixes the only such warning for bcm43xx.

Can you tell me how to make this check please so I can check my code in the kernel? I could look it up but obviously you can tell me quickly :-)

It is the ENABLE_MUST_CHECK option that appeared with the 2.6.18-gitX updates in Linus's tree, where I think X was 4 or 6. When this was turned on, there were a LOT of new warnings.

Larry