Skip to contentSkip to conversation

ipw2100: remove _must_check warning

PATCH New Larry Finger 1 participant 1 message Nov 1, 2006

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

PATCH 1/1 ipw2100: remove _must_check warning

In kernel 2.6.19, there is a configuration option that enables the _must_check logic. This patch adds a check and removes the warning for a pci_enable_device call in the ipw2100 driver.

---

drivers/net/wireless/ipw2100.c +4 -1
Index: wireless-2.6/drivers/net/wireless/ipw2100.c
===================================================================
@@ -6424,6 +6424,7 @@ static int ipw2100_resume(struct pci_dev
 	struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
 	struct net_device *dev = priv->net_dev;
 	u32 val;
+	int err;
 
 	if (IPW2100_PM_DISABLED)
 		return 0;
@@ -6433,7 +6434,9 @@ static int ipw2100_resume(struct pci_dev
 	IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name);
 
 	pci_set_power_state(pci_dev, PCI_D0);
-	pci_enable_device(pci_dev);
+	err = pci_enable_device(pci_dev);
+	if (err)
+		return err;
 	pci_restore_state(pci_dev);
 
 	/*