[PATCH] ASoC: mediatek: mt8188-mt6359: Fix error code in codec_init

Dan Carpenter dan.carpenter at linaro.org
Wed Jun 7 03:48:20 PDT 2023


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




More information about the linux-arm-kernel mailing list