diff options
author | Colin Cross <ccross@android.com> | 2013-12-18 15:17:21 -0800 |
---|---|---|
committer | Ubuntu <vishal.bhoj@linaro.org> | 2014-06-05 10:01:58 +0000 |
commit | 0606c7dcbd61f9733f41e7d631811a5c5de9f6fe (patch) | |
tree | bff9e7debe922828e221a4ba11e9358c50f4acc3 | |
parent | 40f78b541ed8dd3fb9bdfe345a346ea28e91511e (diff) |
libion: return -errno from ion_close
Return -errno from ion_close instead of -1 on error.
Change-Id: Idb828aa4b4d1a660b79d2dba8be32f306eac959d
(cherry picked from commit 1e78c288c89dea367ac1cbfeee788d47bcd0e865)
-rw-r--r-- | libion/ion.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libion/ion.c b/libion/ion.c index 98509492..80bdc2ab 100644 --- a/libion/ion.c +++ b/libion/ion.c @@ -40,7 +40,10 @@ int ion_open() int ion_close(int fd) { - return close(fd); + int ret = close(fd); + if (ret < 0) + return -errno; + return ret; } static int ion_ioctl(int fd, int req, void *arg) |