mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
aux/os: Return 'errno' on device open failure
This commit is contained in:
parent
979536dd4b
commit
f2fcfd98e1
|
@ -122,7 +122,7 @@ os_hid_open_hidraw(const char *path, struct os_hid_device **out_hid)
|
|||
hrdev->fd = open(path, O_RDWR);
|
||||
if (hrdev->fd < 0) {
|
||||
free(hrdev);
|
||||
return -1;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
*out_hid = &hrdev->base;
|
||||
|
|
Loading…
Reference in a new issue