linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] tty: some cleanups in remove functions
@ 2021-01-14 17:57 Uwe Kleine-König
  2021-01-14 17:57 ` [PATCH 1/3] tty: hvcs: Drop unnecessary if block Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2021-01-14 17:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: David S . Miller, linuxppc-dev, sparclinux, linux-kernel

Hello,

while working on changing the prototype of struct vio_driver::remove to
return void I noticed a few exit paths in such callbacks that return an
error code.

This is a bad thing because the return value is ignored (which is the
motivation to make it void) and the corresponding device then ends in
some limbo state.

Luckily for the three offenders here these cases cannot happen and are
simplified accordingly. This then makes the patch that changes the
remove callback's prototype simpler because it only changes prototypes
and drops "return 0"s.

Best regards and thanks for considering,
Uwe Kleine-König

Uwe Kleine-König (3):
  tty: hvcs: Drop unnecessary if block
  tty: vcc: Drop unnecessary if block
  tty: vcc: Drop impossible to hit WARN_ON

 drivers/tty/hvc/hvcs.c |  3 ---
 drivers/tty/vcc.c      | 10 ++--------
 2 files changed, 2 insertions(+), 11 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2021-01-20 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 17:57 [PATCH 0/3] tty: some cleanups in remove functions Uwe Kleine-König
2021-01-14 17:57 ` [PATCH 1/3] tty: hvcs: Drop unnecessary if block Uwe Kleine-König
2021-01-15  8:19   ` Jiri Slaby
2021-01-20 17:16   ` Tyrel Datwyler
2021-01-14 17:57 ` [PATCH 2/3] tty: vcc: " Uwe Kleine-König
2021-01-15  8:20   ` Jiri Slaby
2021-01-14 17:57 ` [PATCH 3/3] tty: vcc: Drop impossible to hit WARN_ON Uwe Kleine-König
2021-01-15  8:20   ` Jiri Slaby

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