public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Trevor Wu (吳文良)" <Trevor.Wu@mediatek.com>
Cc: "kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"amergnat@baylibre.com" <amergnat@baylibre.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH] ASoC: mediatek: mt8188-mt6359: Fix error code in codec_init
Date: Wed, 7 Jun 2023 13:48:20 +0300	[thread overview]
Message-ID: <37fcdf74-d67b-4235-bb76-66df461cdc8a@kadam.mountain> (raw)
In-Reply-To: <6506d2d9deb95d4340261ace299eb8d735a50ddb.camel@mediatek.com>

On Wed, Jun 07, 2023 at 10:30:05AM +0000, Trevor Wu (吳文良) wrote:
> On Wed, 2023-06-07 at 12:41 +0300, Dan Carpenter wrote:
> >  Return -EINVAL on this error path instead of returning success.
> 
> Hi Dan,
> 
> I intended for the function to be reusable by both 2 and 4 amps, which
> is why I added a condition in the middle.
> This shouldn't be considered an error case, so there is no need to
> return -EINVAL here.
> Please kindly inform me if there are any errors in my understanding.

Oh, it looked like an error path.  Let me change it to "return 0;".

regards,
dan carpenter


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2023-06-07 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07  9:41 [PATCH] ASoC: mediatek: mt8188-mt6359: Fix error code in codec_init Dan Carpenter
2023-06-07 10:30 ` Trevor Wu (吳文良)
2023-06-07 10:48   ` Dan Carpenter [this message]

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=37fcdf74-d67b-4235-bb76-66df461cdc8a@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=Trevor.Wu@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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