[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211124115719.238424816@linuxfoundation.org>
Date: Wed, 24 Nov 2021 12:53:22 +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 4.19 012/323] 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
@@ -2166,6 +2166,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