linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mfd: twlx030: i2c remove callback cleanup
@ 2022-01-13 10:14 Uwe Kleine-König
  2022-01-13 10:14 ` [PATCH 1/2] mfd: twl6030: Make twl6030_exit_irq() return void Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2022-01-13 10:14 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones; +Cc: linux-omap, linux-kernel, kernel

Hello,

the remove paths of the twl4030 chip can fail and then returns an error
code in twl_remove() early. This isn't a good thing, because the device
will still go away with some resources not freed.
For the twl6030 this cannot happen, and the first patch is just a small
cleanup. For the twl4030 the situation is improved a bit: When the
failure happens, the dummy slave devices are removed now.

Note that twl4030_exit_irq() is incomplete. The irq isn't freed and
maybe some more cleanup is missing which might boom if an irq triggers
after the device is removed. Not sure that twl6030_exit_irq() is better
in this regard.

I noticed this issue because I work on making i2c_driver::remove return
void as returning a value != 0 there is almost always an error attached
to wrong expectations.

Best regards
Uwe

Uwe Kleine-König (2):
  mfd: twl6030: Make twl6030_exit_irq() return void
  mfd: twl4030: Make twl4030_exit_irq() return void

 drivers/mfd/twl-core.c    | 8 ++------
 drivers/mfd/twl-core.h    | 4 ++--
 drivers/mfd/twl4030-irq.c | 7 ++-----
 drivers/mfd/twl6030-irq.c | 3 +--
 4 files changed, 7 insertions(+), 15 deletions(-)

base-commit: 455e73a07f6e288b0061dfcf4fcf54fa9fe06458
-- 
2.34.1


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

end of thread, other threads:[~2022-05-24  8:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-13 10:14 [PATCH 0/2] mfd: twlx030: i2c remove callback cleanup Uwe Kleine-König
2022-01-13 10:14 ` [PATCH 1/2] mfd: twl6030: Make twl6030_exit_irq() return void Uwe Kleine-König
2022-04-28 16:24   ` Lee Jones
2022-05-23 21:24     ` Uwe Kleine-König
2022-05-24  8:01       ` Lee Jones
2022-01-13 10:14 ` [PATCH 2/2] mfd: twl4030: Make twl4030_exit_irq() " Uwe Kleine-König
2022-04-28 16:24   ` Lee Jones
2022-03-31 13:17 ` [PATCH 0/2] mfd: twlx030: i2c remove callback cleanup Uwe Kleine-König
2022-04-01  7:46   ` Lee Jones

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).