Skip to content

Commit a9a84a8

Browse files
qianfengrongherbertx
authored andcommitted
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 <rongqianfeng@vivo.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent e002780 commit a9a84a8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/crypto/hisilicon/sec/sec_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,8 @@ static int sec_hw_init(struct sec_dev_info *info)
922922
struct iommu_domain *domain;
923923
u32 sec_ipv4_mask = 0;
924924
u32 sec_ipv6_mask[10] = {};
925-
u32 i, ret;
925+
int ret;
926+
u32 i;
926927

927928
domain = iommu_get_domain_for_dev(info->dev);
928929

0 commit comments

Comments
 (0)