]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i2c: tda998x: fix bad value in the AIF
authorJean-Francois Moine <moinejf@free.fr>
Sat, 25 Jan 2014 17:14:44 +0000 (18:14 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 2 Feb 2014 16:33:09 +0000 (16:33 +0000)
The AIF has an uninitialized byte. This patch clears the whole buffer
before filling it.

Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/i2c/tda998x_drv.c

index 400b0c4a10fba3138bbb2fc4cc260058be62cffc..e62082654e010a442a2c621db8485f30a0e6fe14 100644 (file)
@@ -528,10 +528,10 @@ tda998x_write_aif(struct drm_encoder *encoder, struct tda998x_encoder_params *p)
 {
        uint8_t buf[PB(5) + 1];
 
+       memset(buf, 0, sizeof(buf));
        buf[HB(0)] = 0x84;
        buf[HB(1)] = 0x01;
        buf[HB(2)] = 10;
-       buf[PB(0)] = 0;
        buf[PB(1)] = p->audio_frame[1] & 0x07; /* CC */
        buf[PB(2)] = p->audio_frame[2] & 0x1c; /* SF */
        buf[PB(4)] = p->audio_frame[4];