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
|
@ -404,7 +404,10 @@ v3dv_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
|||
info->is_set = info->fd != -1;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue