projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5692650
)
gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Tue, 3 Jan 2017 11:30:27 +0000
(17:00 +0530)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Wed, 4 Jan 2017 09:15:37 +0000
(10:15 +0100)
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
drivers/gpu/drm/mgag200/mgag200_main.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/mgag200/mgag200_main.c
b/drivers/gpu/drm/mgag200/mgag200_main.c
index 95d628b9457e56af865bf99ce0d1b137417915bc..da8ba6c154e33b141e4b52f00d2911c52c5ccbf8 100644
(file)
--- a/
drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/
drivers/gpu/drm/mgag200/mgag200_main.c
@@
-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);