mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
v3dv: initialize render_fd at the top of physical_device_init
This fixes an uninitialized variable warning. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8902>
This commit is contained in:
parent
df48267c65
commit
9e1aa23448
1 changed files with 2 additions and 1 deletions
|
|
@ -597,6 +597,7 @@ physical_device_init(struct v3dv_physical_device *device,
|
|||
{
|
||||
VkResult result = VK_SUCCESS;
|
||||
int32_t master_fd = -1;
|
||||
int32_t render_fd = -1;
|
||||
|
||||
struct vk_physical_device_dispatch_table dispatch_table;
|
||||
vk_physical_device_dispatch_table_from_entrypoints
|
||||
|
|
@ -610,7 +611,7 @@ physical_device_init(struct v3dv_physical_device *device,
|
|||
|
||||
assert(drm_render_device);
|
||||
const char *path = drm_render_device->nodes[DRM_NODE_RENDER];
|
||||
int32_t render_fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
render_fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (render_fd < 0) {
|
||||
result = VK_ERROR_INCOMPATIBLE_DRIVER;
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue