diff mbox

omap-mcbsp: properly check for availablity of mcbsp mux settings

Message ID 1345403692-20829-1-git-send-email-andreas@kemnade.info (mailing list archive)
State New, archived
Headers show

Commit Message

Andreas Kemnade Aug. 19, 2012, 7:14 p.m. UTC
The code did return -EINVAl when the mux_signal function pointer is available.
If not, the corresponding function (the NULL pointer) is called.
This patch inverts that logic.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 sound/soc/omap/mcbsp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jarkko Nikula Aug. 20, 2012, 6:02 a.m. UTC | #1
Hi

On 08/19/2012 10:14 PM, Andreas Kemnade wrote:
> The code did return -EINVAl when the mux_signal function pointer is available.
> If not, the corresponding function (the NULL pointer) is called.
> This patch inverts that logic.
> 
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
Thanks for the patch. Fortunately Peter has already the same fix d0db84e
(ASoC: omap-mcbsp: Fix 6pin mux configuration) for it in:

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

I expect fix to hit 3.6-rc and 3.4-3.5 stable soon.
diff mbox

Patch

diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 34835e8..d33c48b 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -745,7 +745,7 @@  int omap_mcbsp_6pin_src_mux(struct omap_mcbsp *mcbsp, u8 mux)
 {
 	const char *signal, *src;
 
-	if (mcbsp->pdata->mux_signal)
+	if (!mcbsp->pdata->mux_signal)
 		return -EINVAL;
 
 	switch (mux) {