]> git.baikalelectronics.ru Git - kernel.git/commit
staging: emxx_udc: Add checks for dma_alloc_coherent()
authorYuan Can <yuancan@huawei.com>
Thu, 19 Jan 2023 08:31:19 +0000 (08:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:34 +0000 (13:55 +0100)
commit9f96d451db41471d41c137ae63755c2dd86d2fc8
tree9a19987e67bd24e0522f83d827348fcb2e412ac8
parentdd7428d8b81de878b191dccfcc69f7679ca95f93
staging: emxx_udc: Add checks for dma_alloc_coherent()

[ Upstream commit c0b083cb87758bb8f6dd6b40876b5b1108b88f14 ]

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>
drivers/staging/emxx_udc/emxx_udc.c