lkml.org 
[lkml]   [2011]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Sound, Cirrus: Remove redundant check
The variable 'idxp' is a pointer to 'unsigned int', so the value
obtained when dereferencing it is always greater than or equal to
0. Testing this is redundant.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
sound/pci/hda/patch_cirrus.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 47d6ffc..3bd8721 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -385,8 +385,7 @@ static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin,
if (type != AC_WID_AUD_IN)
continue;
*idxp = snd_hda_get_conn_index(codec, nid, pin, false);
- if (*idxp >= 0)
- return nid;
+ return nid;
}
return 0;
}
--
1.7.6

--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.



\
 
 \ /
  Last update: 2011-08-20 00:01    [W:0.095 / U:1.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site