[alsa-devel] [PATCH] treewide: remove redundent IS_ERR() before error code check

Wolfram Sang wsa at the-dreams.de
Mon Jan 6 11:05:58 CET 2020


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 <masahiroy at kernel.org>

For drivers/i2c:

Acked-by: Wolfram Sang <wsa at the-dreams.de>

Thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200106/a0fe29eb/attachment.sig>


More information about the Alsa-devel mailing list