Thread (8 messages) flat view 8 messages, 7 authors, 2020-01-08

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

From: Stephen Boyd <sboyd@kernel.org>
Date: 2020-01-06 06:02:49
Also in: alsa-devel, linux-acpi, linux-clk, linux-crypto, linux-devicetree, linux-gpio, linux-i2c, lkml, netdev

Quoting Masahiro Yamada (2020-01-05 20:58:33)
'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@kernel.org>
---
For
 drivers/clk/clk.c                    | 2 +-
Acked-by: Stephen Boyd <sboyd@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help