From: Mark Brown <broonie@kernel.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: hdac_hdmi: remove always false condition
Date: Wed, 25 Nov 2015 12:36:36 +0000 [thread overview]
Message-ID: <20151125123636.GR1929@sirena.org.uk> (raw)
In-Reply-To: <1448363546-31193-1-git-send-email-sudipm.mukherjee@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-11-25 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 11:12 Sudip Mukherjee
2015-11-25 12:36 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151125123636.GR1929@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sudipm.mukherjee@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®