commit | aab47b293fa42cba6865a6991ca00c7eaafb9710 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Wed Dec 18 15:17:21 2013 -0800 |
committer | Colin Cross <ccross@android.com> | Wed Dec 18 18:27:57 2013 -0800 |
tree | a6a1aa3596ab5e44c10f17714ed9838c47e759b2 | |
parent | 51b6e42231b5d0c0a3bbf03cbd5880f04c277004 [diff] |
libion: return -errno from ion_close Return -errno from ion_close instead of -1 on error. Change-Id: Idb828aa4b4d1a660b79d2dba8be32f306eac959d
diff --git a/libion/ion.c b/libion/ion.c index 9850949..80bdc2a 100644 --- a/libion/ion.c +++ b/libion/ion.c
@@ -40,7 +40,10 @@ 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)