lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 31 Jul 2017 00:43:30 +0800
From:   kbuild test robot <lkp@...el.com>
To:     codekipper@...il.com
Cc:     kbuild-all@...org, maxime.ripard@...e-electrons.com,
        alsa-devel@...a-project.org, Marcus Cooper <codekipper@...il.com>,
        lgirdwood@...il.com, linux-kernel@...r.kernel.org,
        be17068@...rbole.bo.it, linux-sunxi@...glegroups.com,
        broonie@...nel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] ASoC: sun4i-i2s: fix ptr_ret.cocci warnings

sound/soc/sunxi/sun4i-i2s.c:740:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 298207690de9 ("ASoC: sun4i-i2s: Add regmap fields for channels")
CC: Marcus Cooper <codekipper@...il.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 sun4i-i2s.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -737,10 +737,7 @@ static int sun4i_i2s_init_regmap_fields(
 	i2s->field_rxchansel =
 		devm_regmap_field_alloc(dev, i2s->regmap,
 					i2s->variant->field_rxchansel);
-	if (IS_ERR(i2s->field_rxchansel))
-		return PTR_ERR(i2s->field_rxchansel);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(i2s->field_rxchansel);
 }
 
 static int sun4i_i2s_probe(struct platform_device *pdev)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ