From: Qianfeng Rong Date: Wed, 3 Sep 2025 13:25:36 +0000 (+0800) Subject: crypto: hisilicon/sec - Use int type to store negative error codes X-Git-Tag: v6.18-rc1~84^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9a84a853c81b8ecc4ec601f9b04577cf1f86742;p=thirdparty%2Flinux.git crypto: hisilicon/sec - Use int type to store negative error codes Change the 'ret' variable in sec_hw_init() from u32 to int, as it needs to store either negative error codes or zero returned by sec_ipv4_hashmask(). No effect on runtime. Signed-off-by: Qianfeng Rong Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/hisilicon/sec/sec_drv.c b/drivers/crypto/hisilicon/sec/sec_drv.c index ef0cb733c92c8..129cb6faa0b74 100644 --- a/drivers/crypto/hisilicon/sec/sec_drv.c +++ b/drivers/crypto/hisilicon/sec/sec_drv.c @@ -922,7 +922,8 @@ static int sec_hw_init(struct sec_dev_info *info) struct iommu_domain *domain; u32 sec_ipv4_mask = 0; u32 sec_ipv6_mask[10] = {}; - u32 i, ret; + int ret; + u32 i; domain = iommu_get_domain_for_dev(info->dev);