Re: [PATCH] pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()

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

 



On Mon, Sep 10, 2018 at 10:37 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> Smatch complains about this condition:
>
>         if (has_config && num_pins >= 1)
>
> The "has_config" variable is either uninitialized or true.  The
> "num_pins" variable is unsigned and we verified that it is non-zero on
> the lines before so we know "num_pines >= 1" is true.  Really, we could
> just check "num_configs" directly and remove the "has_config" variable.
>
> Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Patch applied with Ludovic's ACK.

Yours,
Linus Walleij



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux