linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] Staging: wlan-ng: hfa384x_usb: fixed an 'else' statement coding style issue
@ 2014-12-20  1:34 Eduardo Barretto
  0 siblings, 0 replies; only message in thread
From: Eduardo Barretto @ 2014-12-20  1:34 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel

Removed useless 'else' statement that followed an 'if' statement that
had a return 1 and moved all the content from the 'else' to outside of
the switch case, this way if any case is sufficient it returns '1',
otherwise it will return 0.

Signed-off-by: Eduardo Barretto <edusbarretto@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 55d2f56..de33a07 100644
--- 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;
 		}
+		break;
 	}
-	return 0;		/* avoid compiler warnings */
+	/* bad code */
+	pr_debug("Encountered unknown PDR#=0x%04x, (>=0x1000), assuming it's bad.\n",
+		 pdrcode);
+	return 0;
 }
-- 
2.2.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-20  1:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-20  1:34 [PATCH v4] Staging: wlan-ng: hfa384x_usb: fixed an 'else' statement coding style issue Eduardo Barretto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).