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

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

 



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



[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