Re: Re: [PATCH] ASoC: wm8350: Handle error for wm8350_register_irq
From: Jiasheng Jiang
Date: Thu Mar 03 2022 - 21:41:26 EST
On Thu, Mar 03, 2022 at 09:38:34PM +0800, Charles Keepax wrote:
>> if (ret != 0)
>> - return ret;
>> + goto err;
>
> I would probably just leave this as a return, nothing is gained
> changing it to a goto.
>
>>
>> + ret = wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R,
>> wm8350_hpr_jack_handler, 0, "Right jack detect",
>> priv);
>> - wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_MICSCD,
>> + if (ret != 0)
>> + goto free_JCK_DET_L;
>
> Probably better to use non-caps here, having caps in a label is a
> little unusual.
Thansk, I have submitted v2 to solve the problems.
Jiang