[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211115165420.775046320@linuxfoundation.org>
Date: Mon, 15 Nov 2021 17:51:46 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Tang Bin <tangbin@...s.chinamobile.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Herbert Xu <herbert@...dor.apana.org.au>
Subject: [PATCH 5.14 023/849] crypto: s5p-sss - Add error handling in s5p_aes_probe()
From: Tang Bin <tangbin@...s.chinamobile.com>
commit a472cc0dde3eb057db71c80f102556eeced03805 upstream.
The function s5p_aes_probe() does not perform sufficient error
checking after executing platform_get_resource(), thus fix it.
Fixes: c2afad6c6105 ("crypto: s5p-sss - Add HASH support for Exynos")
Cc: <stable@...r.kernel.org>
Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/crypto/s5p-sss.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -2171,6 +2171,8 @@ static int s5p_aes_probe(struct platform
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
Powered by blists - more mailing lists