diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2020-03-27 22:36:17 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2020-03-27 22:36:17 +0100 |
| commit | 06dd3f31cb70035cbd3f507c11fd50e3089aeb81 (patch) | |
| tree | 98065919df104fba32191f2464f4193a998cd6a1 /drivers/interconnect/core.c | |
| parent | 82f04bfe2aff428b063eefd234679b2d693228ed (diff) | |
| parent | 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff) | |
Merge tag 'v5.6-rc7' into devel
Linux 5.6-rc7
Diffstat (limited to 'drivers/interconnect/core.c')
| -rw-r--r-- | drivers/interconnect/core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index f277e467156f..2c6515e3ecf1 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -445,6 +445,11 @@ struct icc_path *of_icc_get(struct device *dev, const char *name) path->name = kasprintf(GFP_KERNEL, "%s-%s", src_node->name, dst_node->name); + if (!path->name) { + kfree(path); + return ERR_PTR(-ENOMEM); + } + return path; } EXPORT_SYMBOL_GPL(of_icc_get); @@ -579,6 +584,10 @@ struct icc_path *icc_get(struct device *dev, const int src_id, const int dst_id) } path->name = kasprintf(GFP_KERNEL, "%s-%s", src->name, dst->name); + if (!path->name) { + kfree(path); + path = ERR_PTR(-ENOMEM); + } out: mutex_unlock(&icc_lock); return path; |
