diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-08-30 21:33:37 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-09-03 21:23:07 +0300 |
commit | e9a7c526c29b0ae60c888b335bd6cf6e2ee80154 (patch) | |
tree | af94774c3072ccaac44854623947d11967ff5fb8 | |
parent | b90cb1053190353cc30f0fef0ef1f378ccc063c5 (diff) | |
download | linux-e9a7c526c29b0ae60c888b335bd6cf6e2ee80154.tar.xz |
thermal: int340x_thermal: Consolidate priv->data_vault checks
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@intel.com>
-rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 365489bf4b8c..db8a6f63657d 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -614,9 +614,8 @@ static int int3400_thermal_probe(struct platform_device *pdev) 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: |