Commit 7dd551e2 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

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: 0cec463e ("staging: bcm2835-audio: Simplify callback structure for write data")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f440d909
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment