drivers/crypto/hisilicon/zip/zip_crypto.c:694 hisi_zip_register_to_crypto() warn: missing error code 'ret'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Chenghai Huang <[email protected]>
CC: Herbert Xu <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7404ce51637231382873d0b55edabc2f3b841a9d
commit: ea377793f41989e425498f50ec0c76c70567c1ae crypto: hisilicon/zip - add lz4 algorithm for hisi_zip
date:   5 months ago
:::::: branch date: 26 hours ago
:::::: commit date: 5 months ago
config: loongarch-randconfig-r072-20260705 (https://download.01.org/0day-ci/archive/20260706/[email protected]/config)
compiler: loongarch64-linux-gcc (GCC) 15.2.0
smatch: v0.5.0-9185-gbcc58b9c

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: ea377793f419 ("crypto: hisilicon/zip - add lz4 algorithm for hisi_zip")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
drivers/crypto/hisilicon/zip/zip_crypto.c:694 hisi_zip_register_to_crypto() warn: missing error code 'ret'

vim +/ret +694 drivers/crypto/hisilicon/zip/zip_crypto.c

ea377793f41989 Chenghai Huang 2026-01-17  686  
db700974b69d2c Weili Qian     2022-09-09  687  int hisi_zip_register_to_crypto(struct hisi_qm *qm)
db700974b69d2c Weili Qian     2022-09-09  688  {
b42ab1c61a7783 Weili Qian     2023-09-28  689  	int ret = 0;
b42ab1c61a7783 Weili Qian     2023-09-28  690  
b42ab1c61a7783 Weili Qian     2023-09-28  691  	mutex_lock(&zip_algs_lock);
ea377793f41989 Chenghai Huang 2026-01-17  692  	if (zip_available_devs) {
ea377793f41989 Chenghai Huang 2026-01-17  693  		zip_available_devs++;
b42ab1c61a7783 Weili Qian     2023-09-28 @694  		goto unlock;
ea377793f41989 Chenghai Huang 2026-01-17  695  	}
b42ab1c61a7783 Weili Qian     2023-09-28  696  
b42ab1c61a7783 Weili Qian     2023-09-28  697  	ret = hisi_zip_register_deflate(qm);
b42ab1c61a7783 Weili Qian     2023-09-28  698  	if (ret)
ea377793f41989 Chenghai Huang 2026-01-17  699  		goto unlock;
ea377793f41989 Chenghai Huang 2026-01-17  700  
ea377793f41989 Chenghai Huang 2026-01-17  701  	ret = hisi_zip_register_lz4(qm);
ea377793f41989 Chenghai Huang 2026-01-17  702  	if (ret)
ea377793f41989 Chenghai Huang 2026-01-17  703  		goto unreg_deflate;
ea377793f41989 Chenghai Huang 2026-01-17  704  
ea377793f41989 Chenghai Huang 2026-01-17  705  	zip_available_devs++;
ea377793f41989 Chenghai Huang 2026-01-17  706  	mutex_unlock(&zip_algs_lock);
b42ab1c61a7783 Weili Qian     2023-09-28  707  
ea377793f41989 Chenghai Huang 2026-01-17  708  	return 0;
ea377793f41989 Chenghai Huang 2026-01-17  709  
ea377793f41989 Chenghai Huang 2026-01-17  710  unreg_deflate:
ea377793f41989 Chenghai Huang 2026-01-17  711  	hisi_zip_unregister_deflate(qm);
b42ab1c61a7783 Weili Qian     2023-09-28  712  unlock:
b42ab1c61a7783 Weili Qian     2023-09-28  713  	mutex_unlock(&zip_algs_lock);
b42ab1c61a7783 Weili Qian     2023-09-28  714  	return ret;
62c455ca853e3e Zhou Wang      2019-08-02  715  }
62c455ca853e3e Zhou Wang      2019-08-02  716  

:::::: The code at line 694 was first introduced by commit
:::::: b42ab1c61a77832040ad42ebf9adf237360e49f7 crypto: hisilicon/qm - check function qp num before alg register

:::::: TO: Weili Qian <[email protected]>
:::::: CC: Herbert Xu <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.