[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4786350.31r3eYUQgx@kreacher>
Date: Tue, 30 Aug 2022 20:33:37 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Zhang Rui <rui.zhang@...el.com>,
Chun-Yi Lee <joeyli.kernel@...il.com>
Subject: [PATCH] thermal: int340x_thermal: Consolidate priv->data_vault checks
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
It is sufficient to check priv->data_vault once in the error code path
of int3400_thermal_probe(), so do that.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: linux-pm/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
+++ linux-pm/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
@@ -614,9 +614,8 @@ static int int3400_thermal_probe(struct
free_sysfs:
cleanup_odvp(priv);
- if (priv->data_vault) {
- if (!ZERO_OR_NULL_PTR(priv->data_vault))
- sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group);
+ if (!ZERO_OR_NULL_PTR(priv->data_vault)) {
+ sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group);
kfree(priv->data_vault);
}
free_uuid:
Powered by blists - more mailing lists