Re: [PATCH v2 6/7] pinctrl: Add RTL8231 pin control and GPIO support

Andy Shevchenko
2021-05-17T21:46:59Z

On Tue, May 18, 2021 at 12:42 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Mon, May 17, 2021 at 10:28 PM Sander Vanheule <sander@svanheule.net> wrote:

The rest of the review is here (hit the send before finished).

...

> > + int err = 0;
>
> Check entire series for unnecessary assignments.They

They even may hide a mistake.

...

> > +static int rtl8231_pinctrl_probe(struct platform_device *pdev)
> > +{

> > + ctrl->map = dev_get_regmap(dev->parent, NULL);
> > + if (IS_ERR_OR_NULL(ctrl->map)) {
> > + dev_err(dev, "failed to retrieve regmap\n");
> > + if (!ctrl->map)
> > + return -ENODEV;
> > + else
> > + return PTR_ERR(ctrl->map);
> > + }

Simply split the outer conditional to two.

--
With Best Regards,
Andy Shevchenko