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:Yuan Can <yuancan@huawei.com> Reviewed-by:
Simon Horman <horms@verge.net.au> Link: https://lore.kernel.org/r/20230119083119.16956-1-yuancan@huawei.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment