diff options
author | Andi Shyti <andi.shyti@samsung.com> | 2017-02-09 22:20:53 +0900 |
---|---|---|
committer | Andi Shyti <andi.shyti@samsung.com> | 2017-02-09 22:20:53 +0900 |
commit | a13923ad9f04059ab3f4c902b388f1fe3a8cc1bd (patch) | |
tree | bbae15e16043157a52724f8e92c8a30b1f10f347 | |
parent | f01c8010445e76c3b473dfe403bbb9c3347ea4c2 (diff) |
stmfts: fix close issue
close if the file is not the right one (strncmp different than
'0'), otherwise return because the file is the right one.
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
-rw-r--r-- | stmfts.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -200,12 +200,12 @@ int stmfts_open_event(char *fname) } ret = strncmp(fname, dev_name, STMFTS_INPUT_NAME_SIZE); - if (ret) + if (ret) { + close(fd); continue; + } return fd; - - close(fd); } error(0, ENODEV, "input device not found"); |