Commit 3c3418b4 authored by Xiaoke Wang's avatar Xiaoke Wang Committed by Zheng Zengkai
Browse files

scsi: ufs: ufshcd-pltfrm: Check the return value of devm_kstrdup()

stable inclusion
from stable-v5.10.101
commit 150d448c663d5f01c25aeb31ca62b46525ef5010
bugzilla: https://gitee.com/openeuler/kernel/issues/I5669Z

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=150d448c663d5f01c25aeb31ca62b46525ef5010

--------------------------------

[ Upstream commit a65b3274 ]

devm_kstrdup() returns pointer to allocated string on success, NULL on
failure. So it is better to check the return value of it.

Link: https://lore.kernel.org/r/tencent_4257E15D4A94FF9020DDCC4BB9B21C041408@qq.com


Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarXiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 374130aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment