aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-11-06 10:48:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-11-07 20:05:07 -0500
commit3406118cd34762a7bf6b1a4f1095f9ea7576a354 (patch)
tree5cee591e7595fcbd18b832a35c7f553cd06cc299 /drivers
parentecac598bcd1f151ee4760489bded625c147fb366 (diff)
[PATCH] bcm43xx: Add error checking in bcm43xx_sprom_write()
The Coverity checker noted that these "if (err)"'s couldn't ever be true. It seems the intention was to check the return values of the bcm43xx_pci_write_config32()'s? Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index 62c2ff8dfb9f..a1b783813d8e 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -746,7 +746,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom)
746 if (err) 746 if (err)
747 goto err_ctlreg; 747 goto err_ctlreg;
748 spromctl |= 0x10; /* SPROM WRITE enable. */ 748 spromctl |= 0x10; /* SPROM WRITE enable. */
749 bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); 749 err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
750 if (err) 750 if (err)
751 goto err_ctlreg; 751 goto err_ctlreg;
752 /* We must burn lots of CPU cycles here, but that does not 752 /* We must burn lots of CPU cycles here, but that does not
@@ -768,7 +768,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom)
768 mdelay(20); 768 mdelay(20);
769 } 769 }
770 spromctl &= ~0x10; /* SPROM WRITE enable. */ 770 spromctl &= ~0x10; /* SPROM WRITE enable. */
771 bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); 771 err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
772 if (err) 772 if (err)
773 goto err_ctlreg; 773 goto err_ctlreg;
774 mdelay(500); 774 mdelay(500);