From 1d5bc167643af371b002fe4473d14b909b80f5d9 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 1 Feb 2017 11:57:11 +0000 Subject: [PATCH] staging: bcm2835-audio: use | instead of || otherwise result is just boolean 1 The incorrect or operator is being used resulting in cookies being set to 1 (true) rather than the intended hex value. Fix this by using | instead of ||. Issue found with static analysis with cppcheck Fixes: fb505bd1e1f9218e8ae ("staging: bcm2835-audio: Simplify callback structure for write data") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c index 4bdc8d8eacb9a..878aecfa61b8b 100644 --- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c @@ -91,9 +91,9 @@ bcm2835_vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, size); } -static const u32 BCM2835_AUDIO_WRITE_COOKIE1 = ('B' << 24 | 'C' << 16 || +static const u32 BCM2835_AUDIO_WRITE_COOKIE1 = ('B' << 24 | 'C' << 16 | 'M' << 8 | 'A'); -static const u32 BCM2835_AUDIO_WRITE_COOKIE2 = ('D' << 24 | 'A' << 16 || +static const u32 BCM2835_AUDIO_WRITE_COOKIE2 = ('D' << 24 | 'A' << 16 | 'T' << 8 | 'A'); struct bcm2835_audio_work { -- 2.39.5