On Wed, Dec 9, 2009 at 4:29 AM, Jerome Glisse <jgli...@redhat.com> wrote:
> Initialize some value to safe default in case we hit an
> error path which would leads to uninitialized value.
>

NAK,

this crashes stuff fairly badly I can see it wasn't actually booted at all.

Dave.

> Signed-off-by: Jerome Glisse <jgli...@redhat.com>
> ---
>  drivers/gpu/drm/radeon/radeon_gem.c    |    2 +-
>  drivers/gpu/drm/radeon/radeon_object.h |    1 +
>  2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gem.c 
> b/drivers/gpu/drm/radeon/radeon_gem.c
> index e927f99..2944486 100644
> --- a/drivers/gpu/drm/radeon/radeon_gem.c
> +++ b/drivers/gpu/drm/radeon/radeon_gem.c
> @@ -268,7 +268,7 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void 
> *data,
>        struct drm_gem_object *gobj;
>        struct radeon_bo *robj;
>        int r;
> -       uint32_t cur_placement;
> +       uint32_t cur_placement = 0;
>
>        gobj = drm_gem_object_lookup(dev, filp, args->handle);
>        if (gobj == NULL) {
> diff --git a/drivers/gpu/drm/radeon/radeon_object.h 
> b/drivers/gpu/drm/radeon/radeon_object.h
> index e9da130..21af031 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.h
> +++ b/drivers/gpu/drm/radeon/radeon_object.h
> @@ -125,6 +125,7 @@ static inline int radeon_bo_wait(struct radeon_bo *bo, 
> u32 *mem_type,
>  {
>        int r;
>
> +       *mem_type = 0;
>  retry:
>        r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, 0);
>        if (unlikely(r != 0)) {
> --
> 1.6.5.2
>
>

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to