diff mbox

[15/15] net: wireless: ath: Remove unneeded variable ret returning 0

Message ID 1445439337-19055-16-git-send-email-punitvara@gmail.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Punit Vara Oct. 21, 2015, 2:55 p.m. UTC
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

Unneeded variable: "ret". Return "0" on line 980

Remove unneeded variable ret created to return zero.

Signed-off-by: Punit Vara <punitvara@gmail.com>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Sergei Shtylyov Oct. 21, 2015, 9:46 p.m. UTC | #1
On 10/21/2015 05:55 PM, Punit Vara wrote:

> This patch is to the ath5k/eeprom.c that fixes up warning caught by
> coccicheck:
>
> Unneeded variable: "ret". Return "0" on line 980
>
> Remove unneeded variable ret created to return zero.
>
> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
>   drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index 7c169ab..82982d5 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -935,7 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
>
>   static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
>   {
> -	int ret = 0;
>

   This empty line should be removed too.

>   	static const u32 cipher_suites[] = {
>   		WLAN_CIPHER_SUITE_WEP40,
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Punit Vara Oct. 22, 2015, 6:23 p.m. UTC | #2
On Thu, Oct 22, 2015 at 3:16 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 10/21/2015 05:55 PM, Punit Vara wrote:
>
>> This patch is to the ath5k/eeprom.c that fixes up warning caught by
>> coccicheck:
>>
>> Unneeded variable: "ret". Return "0" on line 980
>>
>> Remove unneeded variable ret created to return zero.
>>
>> Signed-off-by: Punit Vara <punitvara@gmail.com>
>> ---
>>   drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c
>> b/drivers/net/wireless/ath/wcn36xx/main.c
>> index 7c169ab..82982d5 100644
>> --- a/drivers/net/wireless/ath/wcn36xx/main.c
>> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
>> @@ -935,7 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
>>
>>   static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
>>   {
>> -       int ret = 0;
>>
>
>   This empty line should be removed too.
>
>>         static const u32 cipher_suites[] = {
>>                 WLAN_CIPHER_SUITE_WEP40,
>
> [...]
>
> MBR, Sergei
>
I have resend this patch as you said Sergei . Thanks for feedback ..
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 7c169ab..82982d5 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -935,7 +935,6 @@  static const struct ieee80211_ops wcn36xx_ops = {
 
 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 {
-	int ret = 0;
 
 	static const u32 cipher_suites[] = {
 		WLAN_CIPHER_SUITE_WEP40,
@@ -977,7 +976,7 @@  static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 	wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta);
 	wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif);
 
-	return ret;
+	return 0;
 }
 
 static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,