linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] spi: atmel-quadspi: Convert to platform remove callback returning void
@ 2023-03-17  8:42 Uwe Kleine-König
  2023-03-17  8:42 ` [PATCH 1/3] spi: atmel-quadspi: Don't leak clk enable count in pm resume Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-03-17  8:42 UTC (permalink / raw)
  To: Mark Brown, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: linux-spi, linux-arm-kernel, kernel

Hello,

this series converts the atmel-quadspi driver to use the .remove_new()
callback that doesn't return an int but void. The motivation is to not
give driver authors a reason to (wrongly) believe that returning an
error code was sensible error handling. In fact the spi core only emits
a warning message in this case and otherwise continues as if the return
value was zero. This usually yields resource leaks that sometimes can
lead to exceptions later on.

The atmel-quadspi driver is one of these drivers that got error handling
wrong, this is fixed here and in the last patch the driver is converted
to .remove_new() with the eventual goal to change .remove() to return
void once all drivers are converted this way.

Best regards
Uwe

Uwe Kleine-König (3):
  spi: atmel-quadspi: Don't leak clk enable count in pm resume
  spi: atmel-quadspi: Free resources even if runtime resume failed in
    .remove()
  spi: atmel-quadspi: Convert to platform remove callback returning void

 drivers/spi/atmel-quadspi.c | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


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

end of thread, other threads:[~2023-03-17 17:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17  8:42 [PATCH 0/3] spi: atmel-quadspi: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-17  8:42 ` [PATCH 1/3] spi: atmel-quadspi: Don't leak clk enable count in pm resume Uwe Kleine-König
2023-03-17 10:01   ` Tudor Ambarus
2023-03-17  8:42 ` [PATCH 2/3] spi: atmel-quadspi: Free resources even if runtime resume failed in .remove() Uwe Kleine-König
2023-03-17 10:15   ` Tudor Ambarus
2023-03-17  8:42 ` [PATCH 3/3] spi: atmel-quadspi: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-17 10:16   ` Tudor Ambarus
2023-03-17 17:44 ` [PATCH 0/3] " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).