Author: dumbbell Date: Fri Nov 8 22:44:46 2013 New Revision: 257869 URL: http://svnweb.freebsd.org/changeset/base/257869
Log: drm: Initialize "handle" to 0 before calling drm_gem_handle_create() This is variable is being checked in drm_gem_name_create() before being set. Modified: head/sys/dev/drm2/drm_crtc.c head/sys/dev/drm2/radeon/radeon_gem.c Modified: head/sys/dev/drm2/drm_crtc.c ============================================================================== --- head/sys/dev/drm2/drm_crtc.c Fri Nov 8 22:40:33 2013 (r257868) +++ head/sys/dev/drm2/drm_crtc.c Fri Nov 8 22:44:46 2013 (r257869) @@ -2317,6 +2317,7 @@ int drm_mode_getfb(struct drm_device *de r->depth = fb->depth; r->bpp = fb->bits_per_pixel; r->pitch = fb->pitches[0]; + r->handle = 0; fb->funcs->create_handle(fb, file_priv, &r->handle); out: Modified: head/sys/dev/drm2/radeon/radeon_gem.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_gem.c Fri Nov 8 22:40:33 2013 (r257868) +++ head/sys/dev/drm2/radeon/radeon_gem.c Fri Nov 8 22:44:46 2013 (r257869) @@ -567,6 +567,7 @@ int radeon_mode_dumb_create(struct drm_f if (r) return -ENOMEM; + handle = 0; r = drm_gem_handle_create(file_priv, gobj, &handle); /* drop reference from allocate - handle holds it now */ drm_gem_object_unreference_unlocked(gobj); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"