mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
interconnect: core: fix error return code of icc_link_destroy()
[ Upstream commit 715ea61532e731c62392221238906704e63d75b6 ] When krealloc() fails and new is NULL, no error return code of icc_link_destroy() is assigned. To fix this bug, ret is assigned with -ENOMEM hen new is NULL. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20210306132857.17020-1-baijiaju1990@gmail.com Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8f55ad4daf
commit
cc678e2f37
1 changed files with 2 additions and 0 deletions
|
|
@ -704,6 +704,8 @@ int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
|
|||
GFP_KERNEL);
|
||||
if (new)
|
||||
src->links = new;
|
||||
else
|
||||
ret = -ENOMEM;
|
||||
|
||||
out:
|
||||
mutex_unlock(&icc_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue