Re: [PATCH] pinctrl: nxp: Adjust error predicates for improved exception handling in s32_dt_node_to_map()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux