libkms: return -EINVAL on fstat error
On error fstat return -1, instead return -EINVAL to caller Signed-off-by: Maxime Villard <rustyBSD@gmx.fr> Signed-off-by: Jerome Glisse <jglisse@redhat.com>main
parent
1f4b5e11e6
commit
baf0a7daaf
|
@ -68,7 +68,7 @@ linux_name_from_sysfs(int fd, char **out)
|
|||
|
||||
ret = fstat(fd, &buffer);
|
||||
if (ret)
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
|
||||
if (!S_ISCHR(buffer.st_mode))
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue