Commit 4b0ea93f authored by Arvind Yadav's avatar Arvind Yadav Committed by Daniel Vetter

gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap

Here, pci_iomap can fail, handle this case and return -ENOMEM.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com
parent 56926500
...@@ -145,6 +145,8 @@ static int mga_vram_init(struct mga_device *mdev) ...@@ -145,6 +145,8 @@ static int mga_vram_init(struct mga_device *mdev)
} }
mem = pci_iomap(mdev->dev->pdev, 0, 0); mem = pci_iomap(mdev->dev->pdev, 0, 0);
if (!mem)
return -ENOMEM;
mdev->mc.vram_size = mga_probe_vram(mdev, mem); mdev->mc.vram_size = mga_probe_vram(mdev, mem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment