linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] thermal: core: Fix some error handling code in 'thermal_zone_device_register()'
@ 2017-07-16  6:58 Christophe JAILLET
  2017-07-16  6:59 ` [PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path Christophe JAILLET
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christophe JAILLET @ 2017-07-16  6:58 UTC (permalink / raw)
  To: rui.zhang, edubezval
  Cc: linux-pm, linux-kernel, kernel-janitors, Christophe JAILLET

These 3 patches are all related to error handling in
'thermal_zone_device_register()'. I've splitted them in 3 because each
fixes or cleans something different. They could also be merged together
because they are all related to the same few lines of code.

The 1st one fixes in memory leak.
The 2nd reorders code in the error handling path to have it more logical.
The 3rd simplifies the code.

Not 100% sure, but the 2nd one could also avoid an OOPS because we
try to unregister something that has never been registered.

Christophe JAILLET (3):
  thermal: core: Fix a memory leak in 'thermal_zone_device_register()'
    error handling path
  thermal: core: Reorder 'thermal_zone_device_register()' error handling
    code
  thermal: core: Avoid code duplication in
    'thermal_zone_device_register()'

 drivers/thermal/thermal_core.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

-- 
2.11.0


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

end of thread, other threads:[~2017-08-08 13:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-16  6:58 [PATCH 0/3] thermal: core: Fix some error handling code in 'thermal_zone_device_register()' Christophe JAILLET
2017-07-16  6:59 ` [PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path Christophe JAILLET
2017-08-08  8:38   ` Zhang Rui
2017-07-16  6:59 ` [PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code Christophe JAILLET
2017-08-08  8:49   ` Zhang Rui
2017-08-08 12:31     ` Christophe JAILLET
2017-08-08 13:05       ` Zhang Rui
2017-07-16  6:59 ` [PATCH 3/3] thermal: core: Avoid code duplication in 'thermal_zone_device_register()' Christophe JAILLET

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