From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5053302842646902477==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] fix ptr_ret.cocci warnings Date: Thu, 27 Aug 2020 09:41:08 +0800 Message-ID: <20200827014108.GA4548@d10202f75172> In-Reply-To: <202008270904.6ZCiqBMY%lkp@intel.com> List-Id: --===============5053302842646902477== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot crypto/benchmark.c:616: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: 14f42ca5c1a2 ("[TESTING, DO NOT MERGE] crypto - add benchmark and te= sting module") Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git = cryptobench head: 14f42ca5c1a289b166e7e162b45577adffc7a28f commit: 14f42ca5c1a289b166e7e162b45577adffc7a28f [1/1] [TESTING, DO NOT MER= GE] crypto - add benchmark and testing module benchmark.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/crypto/benchmark.c +++ b/crypto/benchmark.c @@ -613,9 +613,7 @@ static int __init cryptobench_init(void) { proc_cryptobench =3D proc_create("cryptobench", 0600, NULL, &cryptobench_fops); - if (IS_ERR(proc_cryptobench)) - return PTR_ERR(proc_cryptobench); - return 0; + return PTR_ERR_OR_ZERO(proc_cryptobench); } = static void __exit cryptobench_exit(void) --===============5053302842646902477==--