summaryrefslogtreecommitdiff
path: root/drivers/hwmon/g762.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/g762.c')
-rw-r--r--drivers/hwmon/g762.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c
index 64a0599b2da5..e2c3c34f06e8 100644
--- a/drivers/hwmon/g762.c
+++ b/drivers/hwmon/g762.c
@@ -620,7 +620,12 @@ static int g762_of_clock_enable(struct i2c_client *client)
data = i2c_get_clientdata(client);
data->clk = clk;
- devm_add_action(&client->dev, g762_of_clock_disable, data);
+ ret = devm_add_action(&client->dev, g762_of_clock_disable, data);
+ if (ret) {
+ dev_err(&client->dev, "failed to add disable clock action\n");
+ goto clk_unprep;
+ }
+
return 0;
clk_unprep: