[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>
This commit is contained in:
Родитель
ecac598bcd
Коммит
3406118cd3
|
@ -746,7 +746,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom)
|
|||
if (err)
|
||||
goto err_ctlreg;
|
||||
spromctl |= 0x10; /* SPROM WRITE enable. */
|
||||
bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
|
||||
err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
|
||||
if (err)
|
||||
goto err_ctlreg;
|
||||
/* 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)
|
|||
mdelay(20);
|
||||
}
|
||||
spromctl &= ~0x10; /* SPROM WRITE enable. */
|
||||
bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
|
||||
err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
|
||||
if (err)
|
||||
goto err_ctlreg;
|
||||
mdelay(500);
|
||||
|
|
Загрузка…
Ссылка в новой задаче