Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550555

Re: [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap

From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
Date 2017-01-04 10:20 +0100
Message-ID <sVPTI-2FK-11@gated-at.bofh.it> (permalink)
References <sVvBD-5vT-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [v1] gpu: drm: mgag200: mgag200_main:- Handle error from  pci_iomap Daniel Vetter <daniel@ffwll.ch> - 2017-01-04 10:20 +0100

csiph-web