Skip to content

Commit

Permalink
thermal: int340x_thermal: Consolidate priv->data_vault checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rafaeljw committed Sep 3, 2022
1 parent b90cb10 commit e9a7c52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/thermal/intel/int340x_thermal/int3400_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e9a7c52

Please sign in to comment.