mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
crypto: s5p-sss - Add error handling in s5p_aes_probe()
commita472cc0ddeupstream. The function s5p_aes_probe() does not perform sufficient error checking after executing platform_get_resource(), thus fix it. Fixes:c2afad6c61("crypto: s5p-sss - Add HASH support for Exynos") Cc: <stable@vger.kernel.org> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9ac25cd2f4
commit
949c5b6daa
|
|
@ -2173,6 +2173,8 @@ static int s5p_aes_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
variant = find_s5p_sss_version(pdev);
|
variant = find_s5p_sss_version(pdev);
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
|
if (!res)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: HASH and PRNG uses the same registers in secss, avoid
|
* Note: HASH and PRNG uses the same registers in secss, avoid
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user