Skip to content

Commit a472cc0

Browse files
Tang Binherbertx
authored andcommitted
crypto: s5p-sss - Add error handling in s5p_aes_probe()
The function s5p_aes_probe() does not perform sufficient error checking after executing platform_get_resource(), thus fix it. Fixes: c2afad6 ("crypto: s5p-sss - Add HASH support for Exynos") Cc: <[email protected]> Signed-off-by: Tang Bin <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent c9f608c commit a472cc0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/crypto/s5p-sss.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,6 +2171,8 @@ static int s5p_aes_probe(struct platform_device *pdev)
21712171

21722172
variant = find_s5p_sss_version(pdev);
21732173
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2174+
if (!res)
2175+
return -EINVAL;
21742176

21752177
/*
21762178
* Note: HASH and PRNG uses the same registers in secss, avoid

0 commit comments

Comments
 (0)