public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Romanick <idr@freedesktop.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nicolas Kaiser <nikai@nikai.net>,
	kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Dave Airlie <airlied@redhat.com>,
	Greg Dietsche <Gregory.Dietsche@cuw.edu>
Subject: Re: [patch] drm: checking the wrong variable in savage_do_init_bci()
Date: Thu, 17 May 2012 17:05:43 +0000	[thread overview]
Message-ID: <4FB52FE7.6070303@freedesktop.org> (raw)
In-Reply-To: <20120517070944.GE14660@elgon.mountain>

On 05/17/2012 12:09 AM, Dan Carpenter wrote:
> drm_core_ioremap() initializes ->handle.  We already know
> "dev->agp_buffer_map" is a valid pointer.
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>

I'm surprised that has never been hit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

>
> diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c
> index cb1ee4e..6eb507a 100644
> --- a/drivers/gpu/drm/savage/savage_bci.c
> +++ b/drivers/gpu/drm/savage/savage_bci.c
> @@ -735,7 +735,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init)
>   			return -EINVAL;
>   		}
>   		drm_core_ioremap(dev->agp_buffer_map, dev);
> -		if (!dev->agp_buffer_map) {
> +		if (!dev->agp_buffer_map->handle) {
>   			DRM_ERROR("failed to ioremap DMA buffer region!\n");
>   			savage_do_cleanup_bci(dev);
>   			return -ENOMEM;
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>


      parent reply	other threads:[~2012-05-17 17:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17  7:09 [patch] drm: checking the wrong variable in savage_do_init_bci() Dan Carpenter
2012-05-17 10:06 ` walter harms
2012-05-17 17:05 ` Ian Romanick [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=4FB52FE7.6070303@freedesktop.org \
    --to=idr@freedesktop.org \
    --cc=Gregory.Dietsche@cuw.edu \
    --cc=airlied@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=nikai@nikai.net \
    /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