Commit a472cc0d authored by Tang Bin's avatar Tang Bin Committed by Herbert Xu
Browse files

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: c2afad6c ("crypto: s5p-sss - Add HASH support for Exynos")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c9f608c3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2171,6 +2171,8 @@ static int s5p_aes_probe(struct platform_device *pdev)

	variant = find_s5p_sss_version(pdev);
	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res)
		return -EINVAL;

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