]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vkms: Fix missing kmalloc allocation failure check
authorColin Ian King <colin.king@canonical.com>
Fri, 15 Jan 2021 13:09:11 +0000 (13:09 +0000)
committerMelissa Wen <melissa.srw@gmail.com>
Fri, 15 Jan 2021 20:45:07 +0000 (17:45 -0300)
commita018c3a04195e95955b17e27c0f4c06b6152c855
tree02f29202280922cbaf0028d3f2287dd2a91b9dad
parentcc883cb79d8ca3c185c83138392188d355ec2cf4
drm/vkms: Fix missing kmalloc allocation failure check

Currently the kmalloc allocation for config is not being null
checked and could potentially lead to a null pointer dereference.
Fix this by adding the missing null check.

Addresses-Coverity: ("Dereference null return value")
Fixes: fdee87af9ea1 ("drm/vkms: Add vkms_config type")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210115130911.71073-1-colin.king@canonical.com
drivers/gpu/drm/vkms/vkms_drv.c