Re: [PATCH] pinctrl: stm32: Modify error handling for pinctrl_register

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

 



On Mon, Jun 27, 2016 at 4:23 PM, Amitoj Kaur Chawla
<amitoj1606@xxxxxxxxx> wrote:

> pinctrl_register returns an ERR_PTR on error.
>
> The Coccinelle semantic patch used to make this change is as follows:
>
> @@
> expression e,e1,e2;
> @@
>
> e = pinctrl_register(...)
> ... when != e = e1
> if (
> -   e == NULL
> +   IS_ERR(e)
>    ) {
>      ...
>      return
> -      e2
> +      PTR_ERR(e)
>      ;
>      }
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@xxxxxxxxx>

I already have a patch like this in my tree it seems.

But very nice that cocinelle is now finding this!

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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