Skip to contentSkip to conversation

Patch "ASoC: lpass-platform: initialize dma channel number" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 9, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ASoC: lpass-platform: initialize dma channel number

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-lpass-platform-initialize-dma-channel-number.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 3b89e4b77ef9c2f985964fab17032db98f074ed0 Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Tue, 8 Nov 2016 14:38:52 +0100
Subject: ASoC: lpass-platform: initialize dma channel number
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Arnd Bergmann <[email protected]>

commit 3b89e4b77ef9c2f985964fab17032db98f074ed0 upstream.

A bugfix accidentally removed the implicit initialization of the dma channel number, causing undefined behavior when v->alloc_dma_channel is NULL:

sound/soc/qcom/lpass-platform.c: In function ‘lpass_platform_pcmops_open’:
sound/soc/qcom/lpass-platform.c:83:29: error: ‘dma_ch’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This adds back an explicit initialization to zero, restoring the previous behavior for that case.

Fixes 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage")
---
 sound/soc/qcom/lpass-platform.c |    3 +++
 1 file changed, 3 insertions(+)
sound/soc/qcom/lpass-platform.c +3 -0
@@ -78,6 +78,9 @@ static int lpass_platform_pcmops_open(st
 	dma_ch = 0;
 	if (v->alloc_dma_channel)
 		dma_ch = v->alloc_dma_channel(drvdata, dir);
+	else
+		dma_ch = 0;
+
 	if (dma_ch < 0)
 		return dma_ch;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/asoc-lpass-platform-initialize-dma-channel-number.patch queue-4.9/scsi-mvsas-fix-command_active-typo.patch queue-4.9/debugfs-improve-define_debugfs_attribute-for-config_debug_fs.patch queue-4.9/f2fs-hide-a-maybe-uninitialized-warning.patch