From patchwork Sun Aug 19 19:14:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 1344701 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2386BDF264 for ; Sun, 19 Aug 2012 19:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751288Ab2HSTnJ (ORCPT ); Sun, 19 Aug 2012 15:43:09 -0400 Received: from h1355771.stratoserver.net ([85.214.105.140]:34738 "EHLO h1355771.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790Ab2HSTnI (ORCPT ); Sun, 19 Aug 2012 15:43:08 -0400 X-Greylist: delayed 1598 seconds by postgrey-1.27 at vger.kernel.org; Sun, 19 Aug 2012 15:43:08 EDT Received: from p5b316590.dip.t-dialin.net ([91.49.101.144] helo=localhost.localdomain) by h1355771.stratoserver.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1T3Az4-0001qj-E5; Sun, 19 Aug 2012 21:16:26 +0200 From: Andreas Kemnade To: peter.ujfalusi@ti.com, jarkko.nikula@bitmer.com, linux-omap@vger.kernel.org Cc: Andreas Kemnade Subject: [PATCH] omap-mcbsp: properly check for availablity of mcbsp mux settings Date: Sun, 19 Aug 2012 21:14:52 +0200 Message-Id: <1345403692-20829-1-git-send-email-andreas@kemnade.info> X-Mailer: git-send-email 1.7.2.5 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- sound/soc/omap/mcbsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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) {