* Re: [ALSA] ca0106: power down SPI DAC channels when not in use
@ 2015-02-26 11:06 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-02-26 11:06 UTC (permalink / raw)
To: xyzzy, Andy Owen, James Courtier-Dutton; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-26 11:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 11:06 [ALSA] ca0106: power down SPI DAC channels when not in use Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox