From patchwork Tue Apr 25 00:43:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9697435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4AA97603F4 for ; Tue, 25 Apr 2017 00:44:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32FD32844B for ; Tue, 25 Apr 2017 00:44:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25A0E28450; Tue, 25 Apr 2017 00:44:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18E962844B for ; Tue, 25 Apr 2017 00:44:12 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A1BCB266998; Tue, 25 Apr 2017 02:44:08 +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 94CF3266B47; Tue, 25 Apr 2017 02:44:07 +0200 (CEST) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by alsa0.perex.cz (Postfix) with ESMTP id C152226664F for ; Tue, 25 Apr 2017 02:44:03 +0200 (CEST) Received: by mail-qk0-f195.google.com with SMTP id o85so12710071qkh.0 for ; Mon, 24 Apr 2017 17:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=8pfantF/lvLgshjUVHNyC6S5EKb6OYZrC82JNXDh+9c=; b=V9aWf54j6f1PAh4hQ8xzypT68ZyXPn5wnXLGoiTwV5EGEm8fCywmOTlM69gDRXhI4v Q9QexH68T6iNExQVpLXx21FJ20flREJ2WTxg6yxR9uQo7XAAxqPGkFp1OyuDswL5XEAF Q/fX0U0Nnfkt6tHhGrpnwcq/xC1HSU6GWXTnrA89rcp+4/UhV+dRQTer4o/5wiFB/9f9 QTMIjyspxXfbDe/ZZ0F79hug9d85CD7+m+vfJ1qLdnxCDY8loTJVDUGWJDFRNDbyIU/c 0nYuiHllTT3xxG7mCC6Lx7ZW8yZCS37PksrVWTY13F7Jlkfv0ULbxyQqY0u3jwVEwJbF fXLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8pfantF/lvLgshjUVHNyC6S5EKb6OYZrC82JNXDh+9c=; b=SLh/KVYt8JW96B4xEVHHYuG56SRTYqujAEArwXMB/7bvsRem6JvQII4/i/4tFWwSn7 ISw7QJyxugcDiCrz96WBrvk04SQzGvlmNm+Q9Spc+Du1StBhGDtyUoMnTtzNjuYaKi03 +Kg/AcMpkMhfwMA63SixjNaGniS7DZFPtHPIjHdN1cmqLv1KxdPPhpdEflJ/7Zl/A7MU rqZFZDx21KvFX9c5JUlRtLWGKDWz2jm95Cd4Y90sZXG4hzCI/EQiywR23Js5qPt63/UC 6nlQILHq/KnOL9CO1xXzWiG8nRZ8rOgWGy4tV8qhU0g2BTiylVPVoH0JpV5rnnNI7UXB pHRQ== X-Gm-Message-State: AN3rC/4ezg2QniAY7/Q3w4Fwu6/h6HexsdBnB1B5P03xN/VE5Tl9jR6m zTFgZo06sleTXg== X-Received: by 10.55.64.83 with SMTP id n80mr29025707qka.268.1493081042154; Mon, 24 Apr 2017 17:44:02 -0700 (PDT) Received: from localhost.localdomain ([187.180.187.30]) by smtp.gmail.com with ESMTPSA id 94sm14067458qte.37.2017.04.24.17.44.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Apr 2017 17:44:01 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 24 Apr 2017 21:43:49 -0300 Message-Id: <1493081029-23975-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: Fabio Estevam , alsa-devel@alsa-project.org, dmurphy@ti.com Subject: [alsa-devel] [PATCH] ASoC: tas2552: Propagate the error code in suspend/resume 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 tas2552_suspend() and tas2552_resume() currently always return success, even though they may fail. Fix this behaviour by always propagating the error code. Signed-off-by: Fabio Estevam Reviewed-by: Dan Murphy --- sound/soc/codecs/tas2552.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index fd5251e..8840f72 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -637,7 +637,7 @@ static int tas2552_suspend(struct snd_soc_codec *codec) if (ret != 0) dev_err(codec->dev, "Failed to disable supplies: %d\n", ret); - return 0; + return ret; } static int tas2552_resume(struct snd_soc_codec *codec) @@ -653,7 +653,7 @@ static int tas2552_resume(struct snd_soc_codec *codec) ret); } - return 0; + return ret; } #else #define tas2552_suspend NULL