Commit 4f067d06 authored by Yuan Can's avatar Yuan Can Committed by sanglipeng
Browse files

staging: emxx_udc: Add checks for dma_alloc_coherent()

stable inclusion
from stable-v5.10.173
commit e8a5efd5aefcc7de0f06983dd6038e4ce3a57632
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7X0QU

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



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

[ Upstream commit f6510a93 ]

As the dma_alloc_coherent may return NULL, the return value needs to be
checked to avoid NULL poineter dereference.

Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Reviewed-by: default avatarSimon Horman <horms@verge.net.au>
Link: https://lore.kernel.org/r/20230119083119.16956-1-yuancan@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 542b112c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment