From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: rui.zhang@intel.com, edubezval@gmail.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: [PATCH 0/3] thermal: core: Fix some error handling code in 'thermal_zone_device_register()'
Date: Sun, 16 Jul 2017 08:58:19 +0200 [thread overview]
Message-ID: <cover.1500187753.git.christophe.jaillet@wanadoo.fr> (raw)
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
next reply other threads:[~2017-07-16 6:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-16 6:58 Christophe JAILLET [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1500187753.git.christophe.jaillet@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=edubezval@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).