* [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
@ 2017-01-03 11:30 Arvind Yadav
2017-01-04 9:15 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-01-03 11:30 UTC (permalink / raw)
To: airlied
Cc: airlied, daniel.vetter, seanpaul, chris, elfring, dri-devel,
linux-kernel
Here, pci_iomap can fail, handle this case and return -ENOMEM.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/gpu/drm/mgag200/mgag200_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index e79cbc2..fb03e30 100644
--- 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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
2017-01-03 11:30 [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap Arvind Yadav
@ 2017-01-04 9:15 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2017-01-04 9:15 UTC (permalink / raw)
To: Arvind Yadav
Cc: airlied, airlied, daniel.vetter, seanpaul, chris, elfring,
dri-devel, linux-kernel
On Tue, Jan 03, 2017 at 05:00:27PM +0530, Arvind Yadav wrote:
> Here, pci_iomap can fail, handle this case and return -ENOMEM.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Applied to drm-misc, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/mgag200/mgag200_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
> index e79cbc2..fb03e30 100644
> --- 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);
>
> --
> 1.9.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-04 9:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 11:30 [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap Arvind Yadav
2017-01-04 9:15 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).