All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 7/8] ASoC: mediatek: mt8195: fix return value
Date: Mon, 25 Oct 2021 13:59:32 -0500	[thread overview]
Message-ID: <20211025185933.144327-8-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20211025185933.144327-1-pierre-louis.bossart@linux.intel.com>

cppcheck reports the following warning:

sound/soc/mediatek/mt8195/mt8195-dai-etdm.c:1299:10: style: Variable
'ret' is assigned a value that is never used. [unreadVariable]
 int ret = 0;
         ^

The suggested change aligns the implementation of
mt8195_afe_disable_etdm() with mt8195_afe_enable_etdm() - same
negative return value upon error.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
index ac591d453e1e..c02c10da3600 100644
--- a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
+++ b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
@@ -1316,7 +1316,7 @@ static int mt8195_afe_disable_etdm(struct mtk_base_afe *afe, int dai_id)
 	}
 out:
 	spin_unlock_irqrestore(&afe_priv->afe_ctrl_lock, flags);
-	return 0;
+	return ret;
 }
 
 static int etdm_cowork_slv_sel(int id, int slave_mode)
-- 
2.25.1


  parent reply	other threads:[~2021-10-25 19:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 18:59 [PATCH 0/8] ASoC: minor cleanup of warnings Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 1/8] ASoC: topology: handle endianness warning Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 2/8] ASoC: rt5682s: use 'static' qualifier Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 3/8] ASoC: nau8821: fix kernel-doc Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 4/8] ASoC: nau8821: clarify out-of-bounds check Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 5/8] ASoC: mediatek: remove unnecessary initialization Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 6/8] ASoC: mediatek: mt8195: rename shadowed array Pierre-Louis Bossart
2021-10-25 18:59 ` Pierre-Louis Bossart [this message]
2021-10-25 18:59 ` [PATCH 8/8] ASoC: rockchip: i2s_tdm: improve return value handling Pierre-Louis Bossart
2021-10-27 17:29 ` [PATCH 0/8] ASoC: minor cleanup of warnings Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211025185933.144327-8-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.