* [PATCH 3/5] staging: vt6656: channel.c: Rewrite ChannelValid function
@ 2011-12-02 0:01 Marcos Paulo de Souza
0 siblings, 0 replies; only message in thread
From: Marcos Paulo de Souza @ 2011-12-02 0:01 UTC (permalink / raw)
To: linux-kernel
Cc: Marcos Paulo de Souza, Greg Kroah-Hartman, Forest Bond, devel
This patch simplifies the code of ChannelValid fucntion.
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: devel@driverdev.osuosl.org
---
drivers/staging/vt6656/channel.c | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index 99e054d..954aee7 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -392,25 +392,16 @@ static struct
BOOL
ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex)
{
- BOOL bValid;
+ /*
+ * If Channel Index is invalid, return invalid
+ */
+ if ((ChannelIndex > CB_MAX_CHANNEL) ||
+ (ChannelIndex == 0))
+ return FALSE;
- bValid = FALSE;
- /*
- * If Channel Index is invalid, return invalid
- */
- if ((ChannelIndex > CB_MAX_CHANNEL) ||
- (ChannelIndex == 0))
- {
- bValid = FALSE;
- goto exit;
- }
-
- bValid = sChannelTbl[ChannelIndex].bValid;
+ return sChannelTbl[ChannelIndex].bValid;
-exit:
- return (bValid);
-
-} /* end ChannelValid */
+}
/************************************************************************
* CHvChannelGetList
--
1.7.4.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-02 2:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-02 0:01 [PATCH 3/5] staging: vt6656: channel.c: Rewrite ChannelValid function Marcos Paulo de Souza
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome