diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 17966a1f7732..15a9f9eba773 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -270,11 +270,11 @@ static struct device_node *of_get_child_regulator(struct device_node *parent, static struct device_node *of_get_regulator(struct device *dev, const char *supply) { struct device_node *regnode = NULL; - char prop_name[32]; /* 32 is max size of property name */ + char prop_name[256]; dev_dbg(dev, "Looking up %s-supply from device tree\n", supply); - snprintf(prop_name, 32, "%s-supply", supply); + snprintf(prop_name, sizeof(prop_name), "%s-supply", supply); regnode = of_parse_phandle(dev->of_node, prop_name, 0); if (!regnode) {