[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 10 Oct 2008 12:00:17 -0700
From: "Luis R. Rodriguez" <lrodriguez@...eros.com>
To: "David Miller" <davem@...emloft.net>
Cc: jirislaby@...il.com, linville@...driver.com,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
jmalinen@...eros.com
Subject: Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
On Fri, Oct 10, 2008 at 11:53 AM, David Miller <davem@...emloft.net> wrote:
> From: Jiri Slaby <jirislaby@...il.com>
> Date: Fri, 10 Oct 2008 19:56:43 +0200
>
>> 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 <jirislaby@...il.com>
>> Cc: Luis R. Rodriguez <lrodriguez@...eros.com>
>> Cc: Jouni Malinen <jmalinen@...eros.com>
>> ---
>> drivers/net/wireless/ath9k/hw.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
>> index 62e44a0..fb6727b 100644
>> --- a/drivers/net/wireless/ath9k/hw.c
>> +++ b/drivers/net/wireless/ath9k/hw.c
>> @@ -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.
Agreed, patches welcomed.
Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists