From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless <linux-wireless@vger.kernel.org>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] bluetooth: fix error cases
Date: Wed, 1 Jun 2011 15:48:33 -0300 [thread overview]
Message-ID: <20110601184833.GA2564@joana> (raw)
In-Reply-To: <20110601184036.GD2509@tuxdriver.com>
* John W. Linville <linville@tuxdriver.com> [2011-06-01 14:40:37 -0400]:
> On Wed, Jun 01, 2011 at 08:39:37AM +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > The error cases in a few functions can use a
> > socket variable that was never initialised,
> > gcc correctly warns about this:
> > net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’:
> > include/linux/spinlock.h:325:19: warning: ‘sk’ may be used uninitialized in this function [-Wuninitialized]
> > net/bluetooth/l2cap_core.c:3789:15: note: ‘sk’ was declared here
> > include/linux/spinlock.h:325:19: warning: ‘sk’ may be used uninitialized in this function [-Wuninitialized]
> > net/bluetooth/l2cap_core.c:3756:15: note: ‘sk’ was declared here
> >
> > Initialise the socket to NULL as clearly intended
> > by the error handling code.
> >
> > Also fix a "set but not used" warning.
> >
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>
> Dave fixed part of these a couple of weeks ago:
>
> commit 6dcae1eaee2b437536b2fe928a609f9589691ebf
> Author: David S. Miller <davem@davemloft.net>
> Date: Mon May 16 23:09:26 2011 -0400
>
> bluetooth: Fix warnings in l2cap_core.c
>
> net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’:
> net/bluetooth/l2cap_core.c:3758:15: warning: ‘sk’ may be used uninitialized
> net/bluetooth/l2cap_core.c:3758:15: note: ‘sk’ was declared here
> net/bluetooth/l2cap_core.c:3791:15: warning: ‘sk’ may be used uninitialized
> net/bluetooth/l2cap_core.c:3791:15: note: ‘sk’ was declared here
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> The "set but not used" bit still applies...
Those are fixed in my -next tree now.
--
Gustavo F. Padovan
http://profusion.mobi
prev parent reply other threads:[~2011-06-01 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 6:39 [PATCH] bluetooth: fix error cases Johannes Berg
2011-06-01 18:40 ` John W. Linville
2011-06-01 18:48 ` Gustavo F. Padovan [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=20110601184833.GA2564@joana \
--to=padovan@profusion.mobi \
--cc=johannes@sipsolutions.net \
--cc=linux-bluetooth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.