treewide: remove redundant IS_ERR() before error code check
commit45586c7078d42b932c5399953d21746800083691
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 4 Feb 2020 01:37:45 +0000 (3 17:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Feb 2020 03:05:27 +0000 (4 03:05 +0000)
tree7a19d7f687a2218a9730a796fd9e940d2d6b2ec2
parent190535f7cf50f2d6d6e603715201c58cd6ec696b
treewide: remove redundant IS_ERR() before error code check

'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>

Link: http://lkml.kernel.org/r/20200106045833.1725-1-masahiroy@kernel.org
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Stephen Boyd <sboyd@kernel.org> [drivers/clk/clk.c]
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> [GPIO]
Acked-by: Wolfram Sang <wsa@the-dreams.de> [drivers/i2c]
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [acpi/scan.c]
Acked-by: Rob Herring <robh@kernel.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28 files changed:
crypto/af_alg.c
drivers/acpi/scan.c
drivers/char/hw_random/bcm2835-rng.c
drivers/char/hw_random/omap-rng.c
drivers/clk/clk.c
drivers/dma/mv_xor_v2.c
drivers/gpio/gpiolib-devres.c
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
drivers/i2c/busses/i2c-mv64xxx.c
drivers/i2c/busses/i2c-synquacer.c
drivers/mtd/ubi/build.c
drivers/of/device.c
drivers/pci/controller/pci-tegra.c
drivers/phy/phy-core.c
drivers/spi/spi-orion.c
drivers/video/fbdev/imxfb.c
fs/ext4/super.c
fs/f2fs/node.c
fs/ocfs2/suballoc.c
fs/sysfs/group.c
net/core/dev.c
net/core/filter.c
net/xfrm/xfrm_policy.c
sound/soc/codecs/ak4104.c
sound/soc/codecs/cs4270.c
sound/soc/codecs/tlv320aic32x4.c
sound/soc/sunxi/sun4i-spdif.c