From: Chester Lin <clin@suse.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: kernel-janitors@vger.kernel.org, s32@nxp.com,
linux-gpio@vger.kernel.org, opensource.kernel@vivo.com,
Linus Walleij <linus.walleij@linaro.org>,
Lu Hongfei <luhongfei@vivo.com>,
LKML <linux-kernel@vger.kernel.org>,
cocci@inria.fr
Subject: Re: [PATCH] pinctrl: nxp: Adjust error predicates for improved exception handling in s32_dt_node_to_map()?
Date: Tue, 13 Jun 2023 17:27:43 +0800 [thread overview]
Message-ID: <ZIg2j025xV7E6yI8@linux-8mug> (raw)
In-Reply-To: <b6c1500b-c901-00c7-e1be-1fa0088972a3@web.de>
On Tue, Jun 13, 2023 at 11:15:22AM +0200, Markus Elfring wrote:
> >>> Ensure child node references are decremented properly in the error path.
> >> …
> >>> +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c
> >>> @@ -279,8 +279,10 @@ static int s32_dt_node_to_map(struct pinctrl_dev *pctldev,
> >>> ret = s32_dt_group_node_to_map(pctldev, np, map,
> >>> &reserved_maps, num_maps,
> >>> np_config->name);
> >>> - if (ret < 0)
> >>> + if (ret < 0) {
> >>> + of_node_put(np);
> >>> break;
> >>> + }
> >>> }
> >>>
> >>> if (ret)
> >>
> >> May the same error predicate be applied at two places here?
> >>
> >
> > I think these two error predicates can be combined together in another patch.
>
> Are you going to reduce such error predicates so that exception handling
> can be improved another bit?
>
Yes, I am. There will be a patch to improve these error predicates. Thanks for
your suggestion.
Regards,
Chester
> Regards,
> Markus
prev parent reply other threads:[~2023-06-13 9:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 7:02 [PATCH] pinctrl: nxp: Fix resource leaks in for_each_child_of_node() loops Lu Hongfei
2023-06-09 7:25 ` Linus Walleij
2023-06-12 14:01 ` [cocci] " Markus Elfring
2023-06-13 6:41 ` Chester Lin
2023-06-13 9:15 ` [cocci] [PATCH] pinctrl: nxp: Adjust error predicates for improved exception handling in s32_dt_node_to_map()? Markus Elfring
2023-06-13 9:27 ` Chester Lin [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=ZIg2j025xV7E6yI8@linux-8mug \
--to=clin@suse.com \
--cc=Markus.Elfring@web.de \
--cc=cocci@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luhongfei@vivo.com \
--cc=opensource.kernel@vivo.com \
--cc=s32@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.