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 2/3 v2] thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function Date: Tue, 8 Aug 2017 16:39:53 +0200 [thread overview] Message-ID: <5b5eea549341cfe25a1dfd608898ad9899a086a4.1502201798.git.christophe.jaillet@wanadoo.fr> (raw) In-Reply-To: <cover.1502201798.git.christophe.jaillet@wanadoo.fr> In-Reply-To: <cover.1502201798.git.christophe.jaillet@wanadoo.fr> Simplify code by using the new 'thermal_zone_destroy_device_groups()' helper function. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- drivers/thermal/thermal_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5a51c740e372..2523901325d0 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -836,11 +836,7 @@ static void thermal_release(struct device *dev) if (!strncmp(dev_name(dev), "thermal_zone", sizeof("thermal_zone") - 1)) { tz = to_thermal_zone(dev); - kfree(tz->trip_type_attrs); - kfree(tz->trip_temp_attrs); - kfree(tz->trip_hyst_attrs); - kfree(tz->trips_attribute_group.attrs); - kfree(tz->device.groups); + thermal_zone_destroy_device_groups(tz); kfree(tz); } else if (!strncmp(dev_name(dev), "cooling_device", sizeof("cooling_device") - 1)) { -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
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 2/3 v2] thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function Date: Tue, 08 Aug 2017 14:39:53 +0000 [thread overview] Message-ID: <5b5eea549341cfe25a1dfd608898ad9899a086a4.1502201798.git.christophe.jaillet@wanadoo.fr> (raw) In-Reply-To: <cover.1502201798.git.christophe.jaillet@wanadoo.fr> Simplify code by using the new 'thermal_zone_destroy_device_groups()' helper function. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- drivers/thermal/thermal_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5a51c740e372..2523901325d0 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -836,11 +836,7 @@ static void thermal_release(struct device *dev) if (!strncmp(dev_name(dev), "thermal_zone", sizeof("thermal_zone") - 1)) { tz = to_thermal_zone(dev); - kfree(tz->trip_type_attrs); - kfree(tz->trip_temp_attrs); - kfree(tz->trip_hyst_attrs); - kfree(tz->trips_attribute_group.attrs); - kfree(tz->device.groups); + thermal_zone_destroy_device_groups(tz); kfree(tz); } else if (!strncmp(dev_name(dev), "cooling_device", sizeof("cooling_device") - 1)) { -- 2.11.0
next prev parent reply other threads:[~2017-08-08 14:42 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-08-08 14:39 [PATCH 0/3 v2] thermal: core: Fix some error handling code in 'thermal_zone_device_register()' Christophe JAILLET 2017-08-08 14:39 ` Christophe JAILLET 2017-08-08 14:39 ` [PATCH 1/3 v2] thermal: core: Add some new helper functions to free resources Christophe JAILLET 2017-08-08 14:39 ` Christophe JAILLET 2017-08-11 3:23 ` Zhang Rui 2017-08-11 3:23 ` Zhang Rui 2017-08-11 3:31 ` Zhang Rui 2017-08-11 3:31 ` Zhang Rui 2017-08-11 7:30 ` walter harms 2017-08-11 7:30 ` walter harms 2017-08-11 8:20 ` Zhang Rui 2017-08-11 8:20 ` Zhang Rui 2017-08-11 9:36 ` walter harms 2017-08-08 14:39 ` Christophe JAILLET [this message] 2017-08-08 14:39 ` [PATCH 2/3 v2] thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function Christophe JAILLET 2017-08-08 14:39 ` [PATCH 3/3 v2] thermal: core: Fix resources release in error paths in thermal_zone_device_register() Christophe JAILLET 2017-08-08 14:39 ` 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=5b5eea549341cfe25a1dfd608898ad9899a086a4.1502201798.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.