summaryrefslogtreecommitdiff
path: root/drivers/hwmon/pmbus/tps53679.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2020-03-08 14:05:33 -0300
committerGitHub <noreply@github.com>2020-03-08 14:05:33 -0300
commitcd7c926fa65431a20a044f55dbd7609beaffbe46 (patch)
tree2111e8c1e50e3fa56fc46bd4e80e5a577459e768 /drivers/hwmon/pmbus/tps53679.c
parent6da05a37e79c312208df0a070ea2fdd35a7d5e51 (diff)
parentf2c1392ff3473a396e4d177ff5ad368b9d6cd211 (diff)
Merge pull request #61 from toradex/4.14-2.3.x-imx
4.14 2.3.x imx: net: sch_generic compilation fix, rel_imx_4.14.98_2.3.1_patch and v4.14.170 stable
Diffstat (limited to 'drivers/hwmon/pmbus/tps53679.c')
-rw-r--r--drivers/hwmon/pmbus/tps53679.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/tps53679.c b/drivers/hwmon/pmbus/tps53679.c
index 85b515cd9df0..2bc352c5357f 100644
--- a/drivers/hwmon/pmbus/tps53679.c
+++ b/drivers/hwmon/pmbus/tps53679.c
@@ -80,7 +80,14 @@ static struct pmbus_driver_info tps53679_info = {
static int tps53679_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- return pmbus_do_probe(client, id, &tps53679_info);
+ struct pmbus_driver_info *info;
+
+ info = devm_kmemdup(&client->dev, &tps53679_info, sizeof(*info),
+ GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ return pmbus_do_probe(client, id, info);
}
static const struct i2c_device_id tps53679_id[] = {