st/egl/drm: only unref the udev device if needed
authorTobias Droste <tdroste@gmx.de>
Thu, 29 Nov 2012 16:02:28 +0000 (17:02 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Dec 2012 17:53:58 +0000 (12:53 -0500)
commitcb8300f5a98016ccc8d34f1bbfee9eb319a2a8a8
tree18ec2be68ea91f6bbb4b01d7da0efc5708c92808
parentbc4bf3c84015144100ebdb4015bf06f7eab9f646
st/egl/drm: only unref the udev device if needed

Fixes compiler warning:

drm/native_drm.c: In function ‘native_create_display’:
drm/native_drm.c:180:21: warning: ‘device’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drm/native_drm.c:157:24: note: ‘device’ was declared here

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/state_trackers/egl/drm/native_drm.c