linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Bing Zhao <bzhao@marvell.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: RE: [patch 3/4] mwifiex: prevent corruption instead of just warning
Date: Tue, 18 Oct 2011 20:23:00 +0200	[thread overview]
Message-ID: <1318962180.3958.30.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <477F20668A386D41ADCC57781B1F70430817F59764@SC-VEXCH1.marvell.com> (sfid-20111018_202134_304312_48DE1FDF)

On Tue, 2011-10-18 at 11:19 -0700, Bing Zhao wrote:

> > @@ -1228,9 +1228,11 @@ static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter,
> >  	if (!skb)
> >  		return 0;
> > 
> > -	if (rdptr >= MWIFIEX_MAX_EVT_BD)
> > +	if (rdptr >= MWIFIEX_MAX_EVT_BD) {
> >  		dev_err(adapter->dev, "event_complete: Invalid rdptr 0x%x\n",
> >  					rdptr);
> > +		return -EINVAL;
> 
> Instead of returning directly, we should set the error code and go through the error handling:
> 		ret = -EINVAL;
> 		goto done;

Are you sure? You don't go to error handling a few lines earlier.

johannes


  reply	other threads:[~2011-10-18 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18  6:15 [patch 3/4] mwifiex: prevent corruption instead of just warning Dan Carpenter
2011-10-18 18:19 ` Bing Zhao
2011-10-18 18:23   ` Johannes Berg [this message]
2011-10-18 18:27     ` Bing Zhao
2011-10-19  7:32   ` [patch 3/4 v2] " Dan Carpenter
2011-10-19 21:29     ` Bing Zhao

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=1318962180.3958.30.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=bzhao@marvell.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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).