[alsa-devel] [PATCH] ASoC: hdac_hdmi: remove always false condition
Mark Brown
broonie at kernel.org
Wed Nov 25 13:36:36 CET 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20151125/48509b9a/attachment.sig>
More information about the Alsa-devel
mailing list