vgem: fix error return in vgem_init()
Subsystems (2)
PATCH 1/1 vgem: fix error return in vgem_init()
From: Alexandr Sapozhnikov <[email protected]>
Return value of function dma_coerce_mask_and_coherent(), called at vgem_drv.c:143, is not checked,
but it is usually checked for this function
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by Alexandr Sapozhnikov <[email protected]>
--- drivers/gpu/drm/vgem/vgem_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/vgem/vgem_drv.c +3 -1
@@ -140,8 +140,10 @@ static int __init vgem_init(void) goto out_unregister; } -dma_coerce_mask_and_coherent (&pdev->dev, + ret =dma_coerce_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (64 )); +if (ret) + goto out_devres; vgem_device =devm_drm_dev_alloc (&pdev->dev, &vgem_driver, struct vgem_device, drm);
Signature · 1 line
2.43.0