From baf0a7daafc7636106e1b19267ed22e22b1a2283 Mon Sep 17 00:00:00 2001 From: Maxime Villard Date: Wed, 2 Jan 2013 10:57:07 -0500 Subject: [PATCH] libkms: return -EINVAL on fstat error On error fstat return -1, instead return -EINVAL to caller Signed-off-by: Maxime Villard Signed-off-by: Jerome Glisse --- libkms/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ret = fstat(fd, &buffer); if (ret) - return ret; + return -EINVAL; if (!S_ISCHR(buffer.st_mode)) return -EINVAL;