kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] gpio: mpc8xxx: Fix 3 errors related to the error handling path of the 'mpc8xxx_probe()'
@ 2021-08-20 15:37 Christophe JAILLET
  2021-08-20 15:37 ` [PATCH 1/3] gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()' Christophe JAILLET
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christophe JAILLET @ 2021-08-20 15:37 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski, alexandru.marginean,
	Laurentiu.Tudor, hui.song_1, andy.shevchenko, ran.wang_1
  Cc: linux-gpio, linux-kernel, kernel-janitors, Christophe JAILLET

This has been split in 3 patches because:
  - the root issue of patch 1 and 3 is not the same commit as the one for patch 2.
  - the strategy to fix the issues is not the same
     - patch 1: add a new call in the rror handling path
     - patch 3: switch to a resource managed function

They could be merged together if easier to review. The subject would then be
something like "gpio: mpc8xxx: Fix the error handling path of 'mpc8xxx_probe()'"

If prefered, 'devm_add_action_or_reset()' could be used to switch the probe to
a fully managed resource function and remove the 'remove' function.
That's mostly a matter of taste.

If such an option is preferred, I'm a bit puzzled by the
'irq_set_chained_handler_and_data()' call in the remove function because I
don't see why it is there.
Also see the comment at the end of patch 1 also related to this function call.


Christophe JAILLET (3):
  gpio: mpc8xxx: Fix a resources leak in the error handling path of
    'mpc8xxx_probe()'
  gpio: mpc8xxx: Fix a potential double iounmap call in
    'mpc8xxx_probe()'
  gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and
    avoid a leak

 drivers/gpio/gpio-mpc8xxx.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-08-31 10:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 15:37 [PATCH 0/3] gpio: mpc8xxx: Fix 3 errors related to the error handling path of the 'mpc8xxx_probe()' Christophe JAILLET
2021-08-20 15:37 ` [PATCH 1/3] gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()' Christophe JAILLET
2021-08-31 10:10   ` Bartosz Golaszewski
2021-08-20 15:38 ` [PATCH 2/3] gpio: mpc8xxx: Fix a potential double iounmap call in 'mpc8xxx_probe()' Christophe JAILLET
2021-08-31 10:10   ` Bartosz Golaszewski
2021-08-20 15:38 ` [PATCH 3/3] gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak Christophe JAILLET
2021-08-31 10:11   ` Bartosz Golaszewski
2021-08-23  8:06 ` [PATCH 0/3] gpio: mpc8xxx: Fix 3 errors related to the error handling path of the 'mpc8xxx_probe()' Bartosz Golaszewski

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