UPSTREAM: ASoC: da7219: Use logical instead of bitwise OR for boolean expression
authorAxel Lin <axel.lin@ingics.com>
Sat, 24 Oct 2015 06:28:33 +0000 (14:28 +0800)
committerXing Zheng <zhengxing@rock-chips.com>
Wed, 13 Apr 2016 03:36:58 +0000 (11:36 +0800)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit a737447d080929c54c664adc9c62eadab9e86d3e)

Change-Id: I7b41ffe3d8144b1d4fa43dbf13e324f2f8d409ad
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
sound/soc/codecs/da7219.c

index f238c1e8a69c16e92649b878edfe07b772c8cd59..e36a7b79b49490c95f897bc921a504aafa4aa730 100644 (file)
@@ -1306,7 +1306,7 @@ static int da7219_hw_params(struct snd_pcm_substream *substream,
        }
 
        channels = params_channels(params);
-       if ((channels < 1) | (channels > DA7219_DAI_CH_NUM_MAX)) {
+       if ((channels < 1) || (channels > DA7219_DAI_CH_NUM_MAX)) {
                dev_err(codec->dev,
                        "Invalid number of channels, only 1 to %d supported\n",
                        DA7219_DAI_CH_NUM_MAX);