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:Bean Huo <beanhuo@micron.com> Signed-off-by:
Xiaoke Wang <xkernel.wang@foxmail.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yu Liao <liaoyu15@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment