diff options
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_drv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 708f7f54001d..2173b82606f6 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -188,7 +188,11 @@ out_unregister: static int __init vkms_init(void) { - struct vkms_config *config = kmalloc(sizeof(*config), GFP_KERNEL); + struct vkms_config *config; + + config = kmalloc(sizeof(*config), GFP_KERNEL); + if (!config) + return -ENOMEM; default_config = config; |