Ath9k: fix uninitialized value in ath9k_hw_reset
PATCH 1/1 Ath9k: fix uninitialized value in ath9k_hw_reset
status ath9k_hw_reset() parameter should be set in every case, since it is used in callers to find out an error code.
--- drivers/net/wireless/ath9k/hw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/ath9k/hw.c +1 -1
@@ -5893,7 +5893,7 @@ bool ath9k_hw_reset(struct ath_hal *ah, }if (!ath9k_hw_setpower (ah,ATH9K_PM_AWAKE )) -return false; +FAIL (-EIO );if (curchan)ath9k_hw_getnf (ah, curchan);
Signature · 1 line
1.6.0.2
Quoted 4 lines · Jiri Slaby
status
ath9k_hw_reset()parameter should be set in every case, since it is used in callers to find out an error code.Signed-off-by Jiri Slaby <[email protected]>
Thanks!
Luis
From: Jiri Slaby <[email protected]>
Date: Fri, 10 Oct 2008 19:56:43 +0200
Quoted 15 lines
status
ath9k_hw_reset()parameter should be set in every case, since it is used in callers to find out an error code.Signed-off-by Jiri Slaby <[email protected]>Cc Luis R. Rodriguez <[email protected]>Cc Jouni Malinen <[email protected]>--- drivers/net/wireless/ath9k/hw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/wireless/ath9k/hw.c +0
-0
drivers/net/wireless/ath9k/hw.c bool ath9k_hw_reset(struct ath_hal *ah, · line 5897
Quoted 6 lines
drivers/net/wireless/ath9k/hw.c +1
-1@@ -5893,7 +5893,7 @@ bool ath9k_hw_reset(struct ath_hal *ah, }if (!ath9k_hw_setpower (ah,ATH9K_PM_AWAKE )) -return false; +FAIL (-EIO );
This fix may be correct, but this is the first time I've noticed these error status updating macros and they are super ugly.
I really think they should be removed. Someone casually scanning this code won't be able to discern the side effects and that makes auditing harder and more error prone.
Quoted 28 lines · David Miller
From: Jiri Slaby <[email protected]>
Date: Fri, 10 Oct 2008 19:56:43 +0200Quoted 15 lines
status
ath9k_hw_reset()parameter should be set in every case, since it is used in callers to find out an error code.Signed-off-by Jiri Slaby <[email protected]>Cc Luis R. Rodriguez <[email protected]>Cc Jouni Malinen <[email protected]>--- drivers/net/wireless/ath9k/hw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/wireless/ath9k/hw.c +0
-0drivers/net/wireless/ath9k/hw.c bool ath9k_hw_reset(struct ath_hal *ah, · line 5897
Quoted 6 lines
drivers/net/wireless/ath9k/hw.c +1
-1@@ -5893,7 +5893,7 @@ bool ath9k_hw_reset(struct ath_hal *ah, }if (!ath9k_hw_setpower (ah,ATH9K_PM_AWAKE )) -return false; +FAIL (-EIO );This fix may be correct, but this is the first time I've noticed these error status updating macros and they are super ugly.
Quoted 3 lines
I really think they should be removed. Someone casually scanning this code won't be able to discern the side effects and that makes auditing harder and more error prone.
Agreed, patches welcomed.
Luis
From: "Luis R. Rodriguez" <[email protected]>
Date: Fri, 10 Oct 2008 12:00:17 -0700
Quoted 1 line
Agreed, patches welcomed.
Translation: "Fix it yourself if you care so much." :-/
Quoted 6 lines · David Miller
From: "Luis R. Rodriguez" <[email protected]>
Date: Fri, 10 Oct 2008 12:00:17 -0700Quoted 1 line
Agreed, patches welcomed.
Translation: "Fix it yourself if you care so much." :-/
Not really, I want to fix it, just want to fix aggregation too. OK fine, I'll send a patch now.
Luis
From: "Luis R. Rodriguez" <[email protected]>
Date: Fri, 10 Oct 2008 12:07:47 -0700
Quoted 9 lines · David Miller
Quoted 6 lines
From: "Luis R. Rodriguez" <[email protected]>
Date: Fri, 10 Oct 2008 12:00:17 -0700Quoted 1 line
Agreed, patches welcomed.
Translation: "Fix it yourself if you care so much." :-/
Not really, I want to fix it, just want to fix aggregation too.
Ok, as long as your intentions are clear :-)
Quoted 1 line
OK fine, I'll send a patch now.
Thank you.