From: Dan Carpenter <dan.carpenter@oracle.com>
To: xyzzy@speakeasy.org, Andy Owen <andy-alsa@ultra-premium.com>,
James Courtier-Dutton <James@superbug.co.uk>
Cc: alsa-devel@alsa-project.org
Subject: Re: [ALSA] ca0106: power down SPI DAC channels when not in use
Date: Thu, 26 Feb 2015 14:06:56 +0300 [thread overview]
Message-ID: <20150226110656.GA17980@mwanda> (raw)
Hello Trent Piepho,
The patch 485100706b4b: "[ALSA] ca0106: power down SPI DAC channels
when not in use" from Jul 25, 2007, leads to the following static
checker warning:
sound/pci/ca0106/ca0106_main.c:601 snd_ca0106_pcm_open_playback_channel()
warn: bool is not less than zero.
sound/pci/ca0106/ca0106_main.c
597
598 /* Front channel dac should already be on */
599 if (channel_id != PCM_FRONT_CHANNEL) {
600 err = snd_ca0106_pcm_power_dac(chip, channel_id, 1);
Because of snd_ca0106_spi_write() then this function appears to return
zero on success and 1 on failure. That's very strange. None of the
callers expect a 1 return. If they care about the return code then they
expect negative error codes.
601 if (err < 0)
602 return err;
603 }
604
regards,
dan carpenter
reply other threads:[~2015-02-26 11:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150226110656.GA17980@mwanda \
--to=dan.carpenter@oracle.com \
--cc=James@superbug.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=andy-alsa@ultra-premium.com \
--cc=xyzzy@speakeasy.org \
/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