linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [cryptodev:master 3/78] drivers/crypto/inside-secure/safexcel_hash.c:2081:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2019-10-10 15:02 kbuild test robot
  2019-10-10 15:02 ` [PATCH] crypto: fix ptr_ret.cocci warnings kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-10-10 15:02 UTC (permalink / raw)
  To: Pascal van Leeuwen; +Cc: kbuild-all, linux-crypto, Herbert Xu

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a
commit: 38f21b4bab11fc877ff18dd02f77f2c34f1105b9 [3/78] crypto: inside-secure - Added support for the AES XCBC ahash

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/crypto/inside-secure/safexcel_hash.c:2081:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] crypto: fix ptr_ret.cocci warnings
  2019-10-10 15:02 [cryptodev:master 3/78] drivers/crypto/inside-secure/safexcel_hash.c:2081:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
@ 2019-10-10 15:02 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-10-10 15:02 UTC (permalink / raw)
  To: Pascal van Leeuwen
  Cc: kbuild-all, linux-crypto, Herbert Xu, Antoine Tenart, linux-kernel

From: kbuild test robot <lkp@intel.com>

drivers/crypto/inside-secure/safexcel_hash.c:2081: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: 38f21b4bab11 ("crypto: inside-secure - Added support for the AES XCBC ahash")
CC: Pascal van Leeuwen <pascalvanl@gmail.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a
commit: 38f21b4bab11fc877ff18dd02f77f2c34f1105b9 [3/78] crypto: inside-secure - Added support for the AES XCBC ahash

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

--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -2078,10 +2078,7 @@ static int safexcel_xcbcmac_cra_init(str
 
 	safexcel_ahash_cra_init(tfm);
 	ctx->kaes = crypto_alloc_cipher("aes", 0, 0);
-	if (IS_ERR(ctx->kaes))
-		return PTR_ERR(ctx->kaes);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(ctx->kaes);
 }
 
 static void safexcel_xcbcmac_cra_exit(struct crypto_tfm *tfm)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-10 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 15:02 [cryptodev:master 3/78] drivers/crypto/inside-secure/safexcel_hash.c:2081:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2019-10-10 15:02 ` [PATCH] crypto: fix ptr_ret.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).