summaryrefslogtreecommitdiff
path: root/drivers/regulator/irq_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/irq_helpers.c')
-rw-r--r--drivers/regulator/irq_helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/irq_helpers.c b/drivers/regulator/irq_helpers.c
index fe7ae0f3f46a..5ab1a0befe12 100644
--- a/drivers/regulator/irq_helpers.c
+++ b/drivers/regulator/irq_helpers.c
@@ -352,6 +352,9 @@ void *regulator_irq_helper(struct device *dev,
h->irq = irq;
h->desc = *d;
+ h->desc.name = devm_kstrdup(dev, d->name, GFP_KERNEL);
+ if (!h->desc.name)
+ return ERR_PTR(-ENOMEM);
ret = init_rdev_state(dev, h, rdev, common_errs, per_rdev_errs,
rdev_amount);