[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1108192358510.31857@swampdragon.chaosbits.net>
Date: Sat, 20 Aug 2011 00:00:06 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: linux-kernel@...r.kernel.org
cc: alsa-devel@...a-project.org,
"Edgar (gimli) Hucek" <gimli@...k-green.com>,
Tim Howe <tim.howe@...rus.com>,
Stephen Warren <swarren@...dia.com>,
Vince Weaver <vweaver1@...s.utk.edu>,
Takashi Iwai <tiwai@...e.de>, Jaroslav Kysela <perex@...ex.cz>
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@...osbits.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@...osbits.net> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists