Skip to contentSkip to conversation

crypto: inside-secure/eip93 - Add check for devm_request_threaded_irq

PATCH In review Aleksander Jan Bajkowski 2 participants 2 messages May 18 – May 29

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: inside-secure/eip93 - Add check for devm_request_threaded_irq

As the potential failure of the devm_request_threaded_irq(), it should be better to check the return value and return error if fails.

Fixes 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
---
 drivers/crypto/inside-secure/eip93/eip93-main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/inside-secure/eip93/eip93-main.c +2 -0
index 7dccfdeb7b11..276839e1a515 100644
@@ -433,6 +433,8 @@ static int eip93_crypto_probe(struct platform_device *pdev)
 	ret = devm_request_threaded_irq(eip93->dev, eip93->irq, eip93_irq_handler,
 					NULL, IRQF_ONESHOT,
 					dev_name(eip93->dev), eip93);
+	if (ret)
+		return ret;
 
 	eip93->ring = devm_kcalloc(eip93->dev, 1, sizeof(*eip93->ring), GFP_KERNEL);
 	if (!eip93->ring)
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 9 lines · Aleksander Jan Bajkowski

As the potential failure of the devm_request_threaded_irq(), it should be better to check the return value and return error if fails.

Fixes 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
---
 drivers/crypto/inside-secure/eip93/eip93-main.c | 2 ++
 1 file changed, 2 insertions(+)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt