[PATCH] Sound, Cirrus: Remove redundant check

From: Jesper Juhl
Date: Fri Aug 19 2011 - 17:59:37 EST


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@xxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/