Commit e9a7c526 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b90cb105
...@@ -614,8 +614,7 @@ static int int3400_thermal_probe(struct platform_device *pdev) ...@@ -614,8 +614,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
free_sysfs: free_sysfs:
cleanup_odvp(priv); cleanup_odvp(priv);
if (priv->data_vault) { if (!ZERO_OR_NULL_PTR(priv->data_vault)) {
if (!ZERO_OR_NULL_PTR(priv->data_vault))
sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group); sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group);
kfree(priv->data_vault); kfree(priv->data_vault);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment