2020-01-06 10:06:47

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] treewide: remove redundent IS_ERR() before error code check

On Mon, Jan 06, 2020 at 01:58:33PM +0900, Masahiro Yamada wrote:
> 'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p).
> Hence, IS_ERR(p) is unneeded.
>
> The semantic patch that generates this commit is as follows:
>
> // <smpl>
> @@
> expression ptr;
> constant error_code;
> @@
> -IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code)
> +PTR_ERR(ptr) == - error_code
> // </smpl>
>
> Signed-off-by: Masahiro Yamada <[email protected]>

For drivers/i2c:

Acked-by: Wolfram Sang <[email protected]>

Thanks!


Attachments:
(No filename) (539.00 B)
signature.asc (849.00 B)
Download all attachments