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

From: Andy Shevchenko
Date: Mon May 17 2021 - 17:46:59 EST


On Tue, May 18, 2021 at 12:42 AM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Mon, May 17, 2021 at 10:28 PM Sander Vanheule <sander@xxxxxxxxxxxxx> 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