From: Jiawen Liu <1298662399@qq.com>
To: broonie@kernel.org
Cc: cl634@andestech.com, william.zhang@broadcom.com,
kursad.oney@broadcom.com, jonas.gorski@gmail.com,
bcm-kernel-feedback-list@broadcom.com, anand.gore@broadcom.com,
f.fainelli@gmail.com, rafal@milecki.pl, olteanv@gmail.com,
han.xu@nxp.com, haibo.chen@nxp.com, yogeshgaur.83@gmail.com,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
Jiawen Liu <1298662399@qq.com>
Subject: [PATCH 1/4] spi: atcspi200: return error from failed controller suspend
Date: Sat, 20 Jun 2026 12:39:28 +0400 [thread overview]
Message-ID: <tencent_306FA547FD68D10EE4B2AE9C132060F12F06@qq.com> (raw)
In-Reply-To: <20260620083931.1120616-1-1298662399@qq.com>
spi_controller_suspend() can fail when the SPI core cannot stop the
controller. atcspi_suspend() ignored that error and disabled the
controller clock anyway.
Return the error before disabling the clock.
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
drivers/spi/spi-atcspi200.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-atcspi200.c b/drivers/spi/spi-atcspi200.c
index 6d4b6aeb3f5b..e0fd101a62bc 100644
--- a/drivers/spi/spi-atcspi200.c
+++ b/drivers/spi/spi-atcspi200.c
@@ -599,8 +599,11 @@ static int atcspi_suspend(struct device *dev)
{
struct spi_controller *host = dev_get_drvdata(dev);
struct atcspi_dev *spi = spi_controller_get_devdata(host);
+ int ret;
- spi_controller_suspend(host);
+ ret = spi_controller_suspend(host);
+ if (ret)
+ return ret;
clk_disable_unprepare(spi->clk);
--
2.34.1
next parent reply other threads:[~2026-06-20 8:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260620083931.1120616-1-1298662399@qq.com>
2026-06-20 8:39 ` Jiawen Liu [this message]
2026-06-30 11:38 ` Mark Brown
2026-06-20 8:39 ` [PATCH 2/4] spi: bcmbca-hsspi: " Jiawen Liu
2026-06-20 8:39 ` [PATCH 3/4] spi: fsl-dspi: clean up after failed suspend and resume Jiawen Liu
2026-06-20 8:39 ` [PATCH 4/4] spi: nxp-fspi: disable runtime PM on probe failures Jiawen Liu
2026-06-20 14:09 ` Frank Li
2026-11-13 12:18 ` Dominique Martinet
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=tencent_306FA547FD68D10EE4B2AE9C132060F12F06@qq.com \
--to=1298662399@qq.com \
--cc=anand.gore@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=cl634@andestech.com \
--cc=f.fainelli@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=han.xu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jonas.gorski@gmail.com \
--cc=kursad.oney@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=rafal@milecki.pl \
--cc=william.zhang@broadcom.com \
--cc=yogeshgaur.83@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®