projects
/
platform
/
kernel
/
linux-rpi3.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
95d628b
..
da8ba6c
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);