[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151125123636.GR1929@sirena.org.uk>
Date: Wed, 25 Nov 2015 12:36:36 +0000
From: Mark Brown <broonie@...nel.org>
To: Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org
Subject: Re: [PATCH] ASoC: hdac_hdmi: remove always false condition
On Tue, Nov 24, 2015 at 04:42:26PM +0530, Sudip Mukherjee wrote:
> hdac->num_nodes is unsigned int and can never be less than 0.
> 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.
Yes, that's a better fix:
> hdac->num_nodes = snd_hdac_get_sub_nodes(hdac, hdac->afg, &nid);
> - if (!nid || hdac->num_nodes < 0) {
> + if (!nid) {
it's clear that we're looking for an error code on failure here.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists