Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433569
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] pinctrl: stm32: Modify error handling for pinctrl_register |
| Date | 2016-06-29 10:40 +0200 |
| Message-ID | <rPjcn-1RY-47@gated-at.bofh.it> (permalink) |
| References | <rOFHY-1ok-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jun 27, 2016 at 4:23 PM, Amitoj Kaur Chawla
<amitoj1606@gmail.com> 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@gmail.com>
I already have a patch like this in my tree it seems.
But very nice that cocinelle is now finding this!
Yours,
Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] pinctrl: stm32: Modify error handling for pinctrl_register Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-06-27 16:30 +0200 Re: [PATCH] pinctrl: stm32: Modify error handling for pinctrl_register Linus Walleij <linus.walleij@linaro.org> - 2016-06-29 10:40 +0200
csiph-web