From: Navid Emamdoost <navid.emamdoost@gmail.com>
To: Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: emamd001@umn.edu, wu000273@umn.edu, kjlu@umn.edu,
smccaman@umn.edu, Navid Emamdoost <navid.emamdoost@gmail.com>
Subject: [PATCH] spi: spi-ti-qspi: call pm_runtime_put on pm_runtime_get failure
Date: Mon, 1 Jun 2020 23:36:37 -0500 [thread overview]
Message-ID: <20200602043637.5317-1-navid.emamdoost@gmail.com> (raw)
The counter is incremented via pm_runtime_get even in failure case.
To correct the counter call pm_runtime_put in case of failure, too.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/spi/spi-ti-qspi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 366a3e5cca6b..dfb811c5ef76 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -174,6 +174,7 @@ static int ti_qspi_setup(struct spi_device *spi)
ret = pm_runtime_get_sync(qspi->dev);
if (ret < 0) {
+ pm_runtime_put_autosuspend(qspi->dev);
dev_err(qspi->dev, "pm_runtime_get_sync() failed\n");
return ret;
}
--
2.17.1
next reply other threads:[~2020-06-02 4:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 4:36 Navid Emamdoost [this message]
2020-06-02 9:54 ` [PATCH] spi: spi-ti-qspi: call pm_runtime_put on pm_runtime_get failure Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2020-06-02 8:40 Markus Elfring
2020-06-02 9:49 ` Mark Brown
2020-06-02 10:02 ` Markus Elfring
2020-06-02 14:13 ` Mark Brown
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=20200602043637.5317-1-navid.emamdoost@gmail.com \
--to=navid.emamdoost@gmail.com \
--cc=broonie@kernel.org \
--cc=emamd001@umn.edu \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=smccaman@umn.edu \
--cc=wu000273@umn.edu \
/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