aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
diff options
context:
space:
mode:
authorMaxime Villard2013-01-02 09:57:07 -0600
committerJerome Glisse2013-01-02 09:57:07 -0600
commitbaf0a7daafc7636106e1b19267ed22e22b1a2283 (patch)
treea43235221bb5f236d0f23c2710051859ec24e991 /libkms
parent1f4b5e11e638fc87bd0ac8e3530b407211b76d45 (diff)
downloadexternal-libdrm-baf0a7daafc7636106e1b19267ed22e22b1a2283.tar.gz
external-libdrm-baf0a7daafc7636106e1b19267ed22e22b1a2283.tar.xz
external-libdrm-baf0a7daafc7636106e1b19267ed22e22b1a2283.zip
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>
Diffstat (limited to 'libkms')
-rw-r--r--libkms/linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkms/linux.c b/libkms/linux.c
index fc4f205c..eec01622 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -68,7 +68,7 @@ linux_name_from_sysfs(int fd, char **out)
68 68
69 ret = fstat(fd, &buffer); 69 ret = fstat(fd, &buffer);
70 if (ret) 70 if (ret)
71 return ret; 71 return -EINVAL;
72 72
73 if (!S_ISCHR(buffer.st_mode)) 73 if (!S_ISCHR(buffer.st_mode))
74 return -EINVAL; 74 return -EINVAL;