Messages in this thread Patch in this message | | | Date | Sat, 20 Aug 2011 00:00:06 +0200 (CEST) | From | Jesper Juhl <> | 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.
| |