public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	broonie@kernel.org
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	trevor.wu@mediatek.com, amergnat@baylibre.com,
	dan.carpenter@linaro.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH 3/5] ASoC: mediatek: mt8188-mt6359: Cleanup return 0 disguised as return ret
Date: Thu, 8 Jun 2023 18:49:14 +0200	[thread overview]
Message-ID: <2ea8d3cf-40d3-3409-5f53-e2eb117ffd9c@gmail.com> (raw)
In-Reply-To: <20230608084727.74403-4-angelogioacchino.delregno@collabora.com>



On 08/06/2023 10:47, AngeloGioacchino Del Regno wrote:
> Change all instances of `return ret` to `return 0` at the end of
> functions where ret is always zero and also change functions
> mt8188_{hdmi,dptx}_codec_init to be consistent with how other
> functions are returning errors
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>   sound/soc/mediatek/mt8188/mt8188-mt6359.c | 20 ++++++++++++--------
>   1 file changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> index b2735496d140..260cace408b9 100644
> --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> @@ -491,11 +491,13 @@ static int mt8188_hdmi_codec_init(struct snd_soc_pcm_runtime *rtd)
>   	}
>   
>   	ret = snd_soc_component_set_jack(component, &priv->hdmi_jack, NULL);
> -	if (ret)
> +	if (ret) {
>   		dev_info(rtd->dev, "%s, set jack failed on %s (ret=%d)\n",
>   			 __func__, component->name, ret);
> +		return ret;
> +	}
>   
> -	return ret;
> +	return 0;
>   }
>   
>   static int mt8188_dptx_codec_init(struct snd_soc_pcm_runtime *rtd)
> @@ -513,11 +515,13 @@ static int mt8188_dptx_codec_init(struct snd_soc_pcm_runtime *rtd)
>   	}
>   
>   	ret = snd_soc_component_set_jack(component, &priv->dp_jack, NULL);
> -	if (ret)
> +	if (ret) {
>   		dev_info(rtd->dev, "%s, set jack failed on %s (ret=%d)\n",
>   			 __func__, component->name, ret);
> +		return ret;
> +	}
>   
> -	return ret;
> +	return 0;
>   }
>   
>   static int mt8188_dumb_amp_init(struct snd_soc_pcm_runtime *rtd)
> @@ -539,7 +543,7 @@ static int mt8188_dumb_amp_init(struct snd_soc_pcm_runtime *rtd)
>   		return ret;
>   	}
>   
> -	return ret;
> +	return 0;
>   }
>   
>   static int mt8188_max98390_hw_params(struct snd_pcm_substream *substream,
> @@ -612,7 +616,7 @@ static int mt8188_max98390_codec_init(struct snd_soc_pcm_runtime *rtd)
>   		return ret;
>   	}
>   
> -	return ret;
> +	return 0;
>   }
>   
>   static int mt8188_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd)
> @@ -660,7 +664,7 @@ static int mt8188_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd)
>   		return ret;
>   	}
>   
> -	return ret;
> +	return 0;
>   };
>   
>   static void mt8188_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd)
> @@ -697,7 +701,7 @@ static int mt8188_nau8825_hw_params(struct snd_pcm_substream *substream,
>   		return ret;
>   	}
>   
> -	return ret;
> +	return 0;
>   }
>   
>   static const struct snd_soc_ops mt8188_nau8825_ops = {

  parent reply	other threads:[~2023-06-08 16:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  8:47 [PATCH 0/5] ASoC: mt8188-mt6359: Cleanups AngeloGioacchino Del Regno
2023-06-08  8:47 ` [PATCH 1/5] ASoC: mediatek: mt8188-mt6359: Compress of_device_id entries AngeloGioacchino Del Regno
2023-06-08  9:31   ` Alexandre Mergnat
2023-06-08 16:48   ` Matthias Brugger
2023-06-08  8:47 ` [PATCH 2/5] ASoC: mediatek: mt8188-mt6359: clean up a return in codec_init AngeloGioacchino Del Regno
2023-06-08  9:32   ` Alexandre Mergnat
2023-06-08 16:48   ` Matthias Brugger
2023-06-08  8:47 ` [PATCH 3/5] ASoC: mediatek: mt8188-mt6359: Cleanup return 0 disguised as return ret AngeloGioacchino Del Regno
2023-06-08  9:33   ` Alexandre Mergnat
2023-06-08 16:49   ` Matthias Brugger [this message]
2023-06-08  8:47 ` [PATCH 4/5] ASoC: mediatek: mt8188-mt6359: Clean up log levels AngeloGioacchino Del Regno
2023-06-08  9:34   ` Alexandre Mergnat
2023-06-08  8:47 ` [PATCH 5/5] ASoC: mediatek: mt8188-mt6359: Use bitfield macros for registers AngeloGioacchino Del Regno
2023-06-08  9:50   ` Alexandre Mergnat
2023-06-08  9:57     ` AngeloGioacchino Del Regno
2023-06-08 10:00       ` Alexandre Mergnat
2023-06-08 10:03   ` Trevor Wu (吳文良)
2023-06-08 10:07     ` AngeloGioacchino Del Regno
2023-06-08 11:02       ` Trevor Wu (吳文良)
2023-06-08 11:20         ` AngeloGioacchino Del Regno
2023-06-08 15:18 ` [PATCH 0/5] ASoC: mt8188-mt6359: Cleanups 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=2ea8d3cf-40d3-3409-5f53-e2eb117ffd9c@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=kernel@collabora.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=trevor.wu@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox