All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: cs42l43: Handle error from devm_pm_runtime_enable
@ 2024-01-24 17:41 Charles Keepax
  2024-01-24 20:58 ` Andy Shevchenko
  2024-01-25 18:25 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Charles Keepax @ 2024-01-24 17:41 UTC (permalink / raw)
  To: broonie; +Cc: andy.shevchenko, patches, linux-spi

As it devm_pm_runtime_enable can fail due to memory allocations, it is
best to handle the error.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/spi/spi-cs42l43.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-cs42l43.c b/drivers/spi/spi-cs42l43.c
index f13073e125936..b24190526ce96 100644
--- a/drivers/spi/spi-cs42l43.c
+++ b/drivers/spi/spi-cs42l43.c
@@ -244,7 +244,10 @@ static int cs42l43_spi_probe(struct platform_device *pdev)
 	priv->ctlr->use_gpio_descriptors = true;
 	priv->ctlr->auto_runtime_pm = true;
 
-	devm_pm_runtime_enable(priv->dev);
+	ret = devm_pm_runtime_enable(priv->dev);
+	if (ret)
+		return ret;
+
 	pm_runtime_idle(priv->dev);
 
 	regmap_write(priv->regmap, CS42L43_TRAN_CONFIG6, CS42L43_FIFO_SIZE - 1);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: cs42l43: Handle error from devm_pm_runtime_enable
  2024-01-24 17:41 [PATCH] spi: cs42l43: Handle error from devm_pm_runtime_enable Charles Keepax
@ 2024-01-24 20:58 ` Andy Shevchenko
  2024-01-25 18:25 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-01-24 20:58 UTC (permalink / raw)
  To: Charles Keepax; +Cc: broonie, patches, linux-spi

On Wed, Jan 24, 2024 at 7:41 PM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:
>
> As it devm_pm_runtime_enable can fail due to memory allocations, it is
> best to handle the error.

devm_pm_runtime_enable()

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: cs42l43: Handle error from devm_pm_runtime_enable
  2024-01-24 17:41 [PATCH] spi: cs42l43: Handle error from devm_pm_runtime_enable Charles Keepax
  2024-01-24 20:58 ` Andy Shevchenko
@ 2024-01-25 18:25 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-01-25 18:25 UTC (permalink / raw)
  To: Charles Keepax; +Cc: andy.shevchenko, patches, linux-spi

On Wed, 24 Jan 2024 17:41:01 +0000, Charles Keepax wrote:
> As it devm_pm_runtime_enable can fail due to memory allocations, it is
> best to handle the error.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: cs42l43: Handle error from devm_pm_runtime_enable
      commit: f9f4b0c6425eb9ffd9bf62b8b8143e786b6ba695

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-25 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 17:41 [PATCH] spi: cs42l43: Handle error from devm_pm_runtime_enable Charles Keepax
2024-01-24 20:58 ` Andy Shevchenko
2024-01-25 18:25 ` Mark Brown

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.