From patchwork Sat May 9 15:45:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6369871 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D14809F32E for ; Sat, 9 May 2015 15:47:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14D9A2022A for ; Sat, 9 May 2015 15:47:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CF51120154 for ; Sat, 9 May 2015 15:47:01 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B50602606D7; Sat, 9 May 2015 17:46:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C6E6E260574; Sat, 9 May 2015 17:46:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D6CC026056A; Sat, 9 May 2015 17:46:26 +0200 (CEST) Received: from mail-yh0-f50.google.com (mail-yh0-f50.google.com [209.85.213.50]) by alsa0.perex.cz (Postfix) with ESMTP id 10556260517 for ; Sat, 9 May 2015 17:46:21 +0200 (CEST) Received: by yhw29 with SMTP id 29so26610571yhw.1 for ; Sat, 09 May 2015 08:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Dqs9IUW1RewXbG0ZzDQXvmhnqbNWErbf3vBZuz2/Q5w=; b=YJvmgv6h7Px9ezlTDEpT16NwQb27bC6hpYT+CB9/iyoLrE81JUtPPOMmRhyGFIve7y r3AE0cCdogrKai9D+8gKn/qWvuEFyJDj1rfNXK8Ellt5AOY1U26v6ZaUw21lVKyuMLoh XHMAwk9gTTz0fTkNfX6y9vHhVnDyJMDh1MSOUI76QJZuOOBo5nfyPpuFKRoaF5QFn3ix po7dbCfFtuDfYlQ+L3If8sfcjxS8SuDxv7Lh4LXFSqc3Za66BRmY8vSBxYSFYTudfs7H 9Q/dno3cgAeAGOh8XEzFTim/nEN+jRsYwfpMEQWazEQR1MVUyLx8gDfRMCP0aENOc9O+ WTxg== X-Received: by 10.170.35.7 with SMTP id 7mr3276842ykd.23.1431186380521; Sat, 09 May 2015 08:46:20 -0700 (PDT) Received: from localhost.localdomain ([187.64.235.17]) by mx.google.com with ESMTPSA id 64sm7364169yhb.54.2015.05.09.08.46.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 09 May 2015 08:46:19 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sat, 9 May 2015 12:45:53 -0300 Message-Id: <1431186353-7331-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431186353-7331-1-git-send-email-festevam@gmail.com> References: <1431186353-7331-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org, timur@tabi.org Subject: [alsa-devel] [PATCH 2/2] ASoC: fsl: imx-mc13783: Simplify trivial if-return sequence X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Simplify a trivial if-return sequence. Possibly combine with a preceding function call. The semantic patch that makes this change is available in scripts/coccinelle/misc/simple_return.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Fabio Estevam --- sound/soc/fsl/imx-mc13783.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c index 9e6493d..bb04590 100644 --- a/sound/soc/fsl/imx-mc13783.c +++ b/sound/soc/fsl/imx-mc13783.c @@ -45,11 +45,7 @@ static int imx_mc13783_hifi_hw_params(struct snd_pcm_substream *substream, if (ret) return ret; - ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 0x3, 2, 16); - if (ret) - return ret; - - return 0; + return snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 0x3, 2, 16); } static struct snd_soc_ops imx_mc13783_hifi_ops = {