Revert "thermal/core: fix error code in __thermal_cooling_device_register()"

This reverts commit ed08f958e4 which is
commit e49a1e1ee078aee21006192076a8d93335e0daa9 upstream.

It is part of a patch series applied to 5.15.91 that breaks the Android
kernel ABI.  If it is really needed, it can be brought back in an
abi-safe way in the future.

Bug: 161946584
Change-Id: I68e61966133593892412c9a8f17170776686710a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-02-02 11:42:09 +00:00
parent 9617a003cc
commit be0ca2fc43

View File

@@ -918,8 +918,7 @@ __thermal_cooling_device_register(struct device_node *np,
cdev->device.class = &thermal_class;
cdev->devdata = devdata;
ret = cdev->ops->get_max_state(cdev, &cdev->max_state);
if (ret)
if (cdev->ops->get_max_state(cdev, &cdev->max_state))
goto out_kfree_type;
thermal_cooling_device_setup_sysfs(cdev);