summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-02-01 14:57:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-02 15:05:06 +0300
commit7dd551e20ea2e27fc0579ad0be9e3c660e1147af (patch)
treef33cee256f9ae39738839484122424baf3e2a6cf
parentf440d909085e497540788fecc056dc39ea0471ed (diff)
downloadlinux-7dd551e20ea2e27fc0579ad0be9e3c660e1147af.tar.xz
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: 0cec463e391e05b807a ("staging: bcm2835-audio: Simplify callback structure for write data") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/bcm2835-audio/bcm2835-vchiq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
index 4bdc8d8eacb9..878aecfa61b8 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 {