[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1448363546-31193-1-git-send-email-sudipm.mukherjee@gmail.com>
Date: Tue, 24 Nov 2015 16:42:26 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] ASoC: hdac_hdmi: remove always false condition
hdac->num_nodes is unsigned int and can never be less than 0.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
Or, maybe, another way can be to declare num_nodes as int. Then this
test makes sense and also snd_hdac_get_sub_nodes() is returning an int.
sound/soc/codecs/hdac_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 205f2c2..02109aa 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -415,7 +415,7 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev)
int cvt_nid = 0, pin_nid = 0;
hdac->num_nodes = snd_hdac_get_sub_nodes(hdac, hdac->afg, &nid);
- if (!nid || hdac->num_nodes < 0) {
+ if (!nid) {
dev_warn(&hdac->dev, "HDMI: failed to get afg sub nodes\n");
return -EINVAL;
}
--
1.9.1
--
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