lkml.org 
[lkml]   [2014]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging: wlan-ng: hfa384x_usb: fixed an 'else' statement coding style issue
From
Date
On Mon, 2014-12-15 at 00:02 -0200, Eduardo Barretto wrote:
> Fixed a coding style issue
[]
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
[]
> @@ -4123,12 +4123,11 @@ static int hfa384x_isgood_pdrcode(u16 pdrcode)
> pr_debug("Encountered unknown PDR#=0x%04x, assuming it's ok.\n",
> pdrcode);
> return 1;
> - } else {
> - /* bad code */
> - pr_debug("Encountered unknown PDR#=0x%04x, (>=0x1000), assuming it's bad.\n",
> - pdrcode);
> - return 0;
> }
> + /* bad code */
> + pr_debug("Encountered unknown PDR#=0x%04x, (>=0x1000), assuming it's bad.\n",
> + pdrcode);
> + return 0;
> }
> return 0; /* avoid compiler warnings */
> }

While this patch isn't necessary, if any change is
done, it might better to not have two consecutive
return 0; uses.




\
 
 \ /
  Last update: 2014-12-15 03:41    [W:0.109 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site