diff mbox

ASoC: da7219: Use logical instead of bitwise OR for boolean expression

Message ID 1445668113.26836.0.camel@ingics.com (mailing list archive)
State Accepted
Commit a737447d080929c54c664adc9c62eadab9e86d3e
Headers show

Commit Message

Axel Lin Oct. 24, 2015, 6:28 a.m. UTC
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/da7219.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Adam Thomson Nov. 2, 2015, 11:14 a.m. UTC | #1
On October 24, 2015 07:29, Axel Lin wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  sound/soc/codecs/da7219.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
> index abba4b3..86c528a 100644
> --- a/sound/soc/codecs/da7219.c
> +++ b/sound/soc/codecs/da7219.c
> @@ -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);
> --
> 2.1.4

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
diff mbox

Patch

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index abba4b3..86c528a 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -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);