linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: airlied@linux.ie, airlied@redhat.com, daniel.vetter@ffwll.ch,
	seanpaul@chromium.org, chris@chris-wilson.co.uk,
	elfring@users.sourceforge.net, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [v1] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
Date: Wed, 4 Jan 2017 10:15:50 +0100	[thread overview]
Message-ID: <20170104091550.2qifjmxpggsq6anc@phenom.ffwll.local> (raw)
In-Reply-To: <1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com>

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

      reply	other threads:[~2017-01-04  9:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170104091550.2qifjmxpggsq6anc@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=elfring@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).