Skip to content

Commit

Permalink
gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
Browse files Browse the repository at this point in the history
Here, pci_iomap can fail, handle this case and return -ENOMEM.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com
  • Loading branch information
ArvindYadavCs authored and danvet committed Jan 4, 2017
1 parent 5692650 commit 4b0ea93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/mgag200/mgag200_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ static int mga_vram_init(struct mga_device *mdev)
}

mem = pci_iomap(mdev->dev->pdev, 0, 0);
if (!mem)
return -ENOMEM;

mdev->mc.vram_size = mga_probe_vram(mdev, mem);

Expand Down

0 comments on commit 4b0ea93

Please sign in to comment.