[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb27626a-fb4f-9974-35bd-64453e0f29a7@huawei.com>
Date: Fri, 16 Jul 2021 09:04:03 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: "weiyongjun (A)" <weiyongjun1@...wei.com>,
Tony Lindgren <tony@...mide.com>,
Haojian Zhuang <haojian.zhuang@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
Manjunathappa Prakash <prakash.pm@...com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-omap <linux-omap@...r.kernel.org>,
linux-gpio <linux-gpio@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: single: Fix error return code in
pcs_parse_bits_in_pinctrl_entry()
On 2021/7/15 19:49, weiyongjun (A) wrote:
>> Fix to return -ENOTSUPP instead of 0 when PCS_HAS_PINCONF is true, which
>> is the same as that returned in pcs_parse_pinconf().
>>
>> In addition, I found the value of pcs->flags is not overwritten in
>> pcs_parse_bits_in_pinctrl_entry() and its subfunctions, so moving this
>> check to the beginning of the function eliminates unnecessary rollback
>> operations.
>>
>> Fixes: 4e7e8017a80e ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules")
>> Reported-by: Hulk Robot <hulkci@...wei.com>
>> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
>> ---
>> drivers/pinctrl/pinctrl-single.c | 21 ++++++++-------------
>> 1 file changed, 8 insertions(+), 13 deletions(-)
>>
>>
>> npins_in_row = pcs->width / pcs->bits_per_pin;
>> vals = devm_kzalloc(pcs->dev,
>> @@ -1212,29 +1217,19 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
>> goto free_pins;
>> }
>> - gsel = pinctrl_generic_add_group(pcs->pctl, np->name, pins, found, pcs);
>> - if (gsel < 0) {
>> - res = gsel;
>> + res = pinctrl_generic_add_group(pcs->pctl, np->name, pins, found, pcs);
>> + if (res < 0)
>> goto free_function;
>> - }
>
>
> This change cause 'gsel' not set.
>
> Do not mix this cleanup with bugfix.
gsel已经不需要了,已经被我删掉了
>
>
>
> .
>
Powered by blists - more mailing lists