If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'ret' from the function.
Signed-off-by: Jesper Juhl <redacted>
---
net/wireless/scan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--
1.7.5.2
--
Jesper Juhl <jj-IYz4IdjRLj0sV2N9l4h3zg@public.gmane.org> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Johannes Berg <johannes@sipsolutions.net> Date: 2011-06-29 20:27:30
On Wed, 2011-06-29 at 22:13 +0200, Jesper Juhl wrote:
If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'ret' from the function.
'err'. I also dislike the initialisation, can we just replace the
"return err;" at the end of the function with "return 0;" instead?
Luca, should it maybe be return -ENOENT anyway in the !sched_scan_req
case?
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2011-06-29 at 22:27 +0200, Johannes Berg wrote:
On Wed, 2011-06-29 at 22:13 +0200, Jesper Juhl wrote:
quoted
If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'ret' from the function.
'err'. I also dislike the initialisation, can we just replace the
"return err;" at the end of the function with "return 0;" instead?
Luckily we were never using the return value when passing
driver_initiate =- false.
And I agree with you, there's no use to return err at the end. Better
to simply return 0.
Luca, should it maybe be return -ENOENT anyway in the !sched_scan_req
case?
We could do that. I had just thought that stopping a scan that is not
running would just be a NOP, but if you prefer to return an error in
that case, I can do it.
--
Cheers,
Luca.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2011-06-29 at 22:27 +0200, Johannes Berg wrote:
quoted
On Wed, 2011-06-29 at 22:13 +0200, Jesper Juhl wrote:
quoted
If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'ret' from the function.
'err'. I also dislike the initialisation, can we just replace the
"return err;" at the end of the function with "return 0;" instead?
Luckily we were never using the return value when passing
driver_initiate =- false.
And I agree with you, there's no use to return err at the end. Better
to simply return 0.
Ok, so how about this?
From 606ee120df85dbd5205996878f50e51b8b7cd4a3 Mon Sep 17 00:00:00 2001
From: Jesper Juhl <redacted>
Date: Wed, 29 Jun 2011 22:49:33 +0200
Subject: [PATCH] net, wireless: Don't return uninitialized in
__cfg80211_stop_sched_scan()
If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'err' from the function.
Signed-off-by: Jesper Juhl <redacted>
---
net/wireless/scan.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
From: Johannes Berg <johannes@sipsolutions.net> Date: 2011-06-29 20:55:45
On Wed, 2011-06-29 at 22:42 +0200, Jesper Juhl wrote:
On Wed, 29 Jun 2011, Luciano Coelho wrote:
quoted
On Wed, 2011-06-29 at 22:27 +0200, Johannes Berg wrote:
quoted
On Wed, 2011-06-29 at 22:13 +0200, Jesper Juhl wrote:
quoted
If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'ret' from the function.
'err'. I also dislike the initialisation, can we just replace the
"return err;" at the end of the function with "return 0;" instead?
Luckily we were never using the return value when passing
driver_initiate =- false.
And I agree with you, there's no use to return err at the end. Better
to simply return 0.