netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: John Linville <linville@tuxdriver.com>,
	bunk@stusta.de, netdev@vger.kernel.org,
	Bcm43xx-dev@lists.berlios.de, Stefano Brivio <st3@riseup.net>
Subject: Re: [PATCH] bcm43xx: Add error checking in bcm43xx_sprom_write()
Date: Mon, 6 Nov 2006 17:38:21 +0100	[thread overview]
Message-ID: <200611061738.21918.mb@bu3sch.de> (raw)
In-Reply-To: <454F5960.mailHVB136L2I@lwfinger.net>

On Monday 06 November 2006 16:48, Larry Finger wrote:
> From: Adrian Bunk <bunk@stusta.de>
> 
> 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?

Whoops, I thought I had fixed this bug long time ago.
The patch is correct.

> 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>

> Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
> ===================================================================
> --- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
> +++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
> @@ -750,7 +750,7 @@ int bcm43xx_sprom_write(struct bcm43xx_p
>  	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
> @@ -772,7 +772,7 @@ int bcm43xx_sprom_write(struct bcm43xx_p
>  		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);
> 

-- 
Greetings Michael.

      reply	other threads:[~2006-11-06 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 15:48 [PATCH] bcm43xx: Add error checking in bcm43xx_sprom_write() Larry Finger
2006-11-06 16:38 ` Michael Buesch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611061738.21918.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=Bcm43xx-dev@lists.berlios.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bunk@stusta.de \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=st3@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).