mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
v3dv: check return value of drmGetMagic
Fixes coverty issue: ** CID 1470345: Error handling issues (CHECKED_RETURN) /src/broadcom/vulkan/v3dv_device.c: 407 in v3dv_drm_handle_device() Calling "drmGetMagic" without checking return value (as is done elsewhere 5 out of 6 times). Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7828>
This commit is contained in:
parent
124ea8debf
commit
b14679ab22
1 changed files with 4 additions and 1 deletions
|
|
@ -404,7 +404,10 @@ v3dv_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
||||||
info->is_set = info->fd != -1;
|
info->is_set = info->fd != -1;
|
||||||
|
|
||||||
drm_magic_t magic;
|
drm_magic_t magic;
|
||||||
drmGetMagic(info->fd, &magic);
|
if (drmGetMagic(info->fd, &magic)) {
|
||||||
|
fprintf(stderr, "drmGetMagic failed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
wl_drm_authenticate(info->wl_drm, magic);
|
wl_drm_authenticate(info->wl_drm, magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue