All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Alain Volmat <alain.volmat@foss.st.com>,
	Wolfram Sang <wsa@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y v2 2/5] i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq
Date: Wed, 30 Jul 2025 09:59:59 -0400	[thread overview]
Message-ID: <20250730140002.3814528-2-sashal@kernel.org> (raw)
In-Reply-To: <20250730140002.3814528-1-sashal@kernel.org>

From: Alain Volmat <alain.volmat@foss.st.com>

[ Upstream commit a51e224c2f42417e95a3e1a672ade221bcd006ba ]

Convert error handling upon calls of devm_request_irq functions during
the probe of the driver.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Stable-dep-of: 6aae87fe7f18 ("i2c: stm32f7: unmap DMA mapped buffer")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/i2c/busses/i2c-stm32f7.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index cd9c6ffc2e61..cb9093b43be2 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2198,19 +2198,13 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 					stm32f7_i2c_isr_event_thread,
 					IRQF_ONESHOT,
 					pdev->name, i2c_dev);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to request irq event %i\n",
-			irq_event);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret, "Failed to request irq event\n");
 
 	ret = devm_request_irq(&pdev->dev, irq_error, stm32f7_i2c_isr_error, 0,
 			       pdev->name, i2c_dev);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to request irq error %i\n",
-			irq_error);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret, "Failed to request irq error\n");
 
 	setup = of_device_get_match_data(&pdev->dev);
 	if (!setup) {
-- 
2.39.5


  reply	other threads:[~2025-07-30 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21  9:24 FAILED: patch "[PATCH] i2c: stm32f7: unmap DMA mapped buffer" failed to apply to 6.6-stable tree gregkh
2025-07-23  0:19 ` [PATCH 6.6.y 1/6] i2c: stm32f7: Use devm_clk_get_enabled() Sasha Levin
2025-07-23  0:19   ` [PATCH 6.6.y 2/6] i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq Sasha Levin
2025-07-23  0:19   ` [PATCH 6.6.y 3/6] i2c: stm32f7: perform most of irq job in threaded handler Sasha Levin
2025-07-23  0:19   ` [PATCH 6.6.y 4/6] i2c: stm32f7: simplify status messages in case of errors Sasha Levin
2025-07-23  0:19   ` [PATCH 6.6.y 5/6] i2c: stm32: fix the device used for the DMA map Sasha Levin
2025-07-30  9:03     ` Greg KH
2025-07-30 13:50       ` Sasha Levin
2025-07-23  0:19   ` [PATCH 6.6.y 6/6] i2c: stm32f7: unmap DMA mapped buffer Sasha Levin
2025-07-30 13:59 ` [PATCH 6.6.y v2 1/5] i2c: stm32f7: Use devm_clk_get_enabled() Sasha Levin
2025-07-30 13:59   ` Sasha Levin [this message]
2025-07-30 14:00   ` [PATCH 6.6.y v2 3/5] i2c: stm32f7: perform most of irq job in threaded handler Sasha Levin
2025-07-30 14:00   ` [PATCH 6.6.y v2 4/5] i2c: stm32f7: simplify status messages in case of errors Sasha Levin
2025-07-30 14:00   ` [PATCH 6.6.y v2 5/5] i2c: stm32f7: unmap DMA mapped buffer Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250730140002.3814528-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=alain.volmat@foss.st.com \
    --cc=stable@vger.kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.