diff options
Diffstat (limited to 'drivers/mfd/syscon.c')
-rw-r--r-- | drivers/mfd/syscon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 57b29c325131..c9550368d9ea 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -105,6 +105,10 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_res) } syscon_config.name = kasprintf(GFP_KERNEL, "%pOFn@%pa", np, &res.start); + if (!syscon_config.name) { + ret = -ENOMEM; + goto err_regmap; + } syscon_config.reg_stride = reg_io_width; syscon_config.val_bits = reg_io_width * 8; syscon_config.max_register = resource_size(&res) - reg_io_width; |