Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/3] bnep: Calculate ifindex after NULL check
@ 2014-01-24 14:56 Andrei Emeltchenko
  2014-01-24 14:56 ` [PATCH 2/3] android/avdtp: Retry send on EAGAIN as well Andrei Emeltchenko
  2014-01-24 14:56 ` [PATCH 3/3] avctp: Fix unchecked return value Andrei Emeltchenko
  0 siblings, 2 replies; 8+ messages in thread
From: Andrei Emeltchenko @ 2014-01-24 14:56 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

---
 profiles/network/bnep.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index 2a74016..0ef85d5 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -518,13 +518,15 @@ static int bnep_add_to_bridge(const char *devname, const char *bridge)
 
 static int bnep_del_from_bridge(const char *devname, const char *bridge)
 {
-	int ifindex = if_nametoindex(devname);
+	int ifindex;
 	struct ifreq ifr;
 	int sk, err;
 
 	if (!devname || !bridge)
 		return -EINVAL;
 
+	ifindex = if_nametoindex(devname);
+
 	sk = socket(AF_INET, SOCK_STREAM, 0);
 	if (sk < 0)
 		return -1;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-27 18:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 14:56 [PATCH 1/3] bnep: Calculate ifindex after NULL check Andrei Emeltchenko
2014-01-24 14:56 ` [PATCH 2/3] android/avdtp: Retry send on EAGAIN as well Andrei Emeltchenko
2014-01-24 22:16   ` Szymon Janc
2014-01-26  4:29     ` Luiz Augusto von Dentz
2014-01-24 14:56 ` [PATCH 3/3] avctp: Fix unchecked return value Andrei Emeltchenko
2014-01-24 15:00   ` Anderson Lizardo
2014-01-27 15:59     ` [PATCHv2] " Andrei Emeltchenko
2014-01-27 18:41       ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox