projects
/
platform
/
core
/
system
/
libdevice-node.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6327292
)
Fixed incorrect use of errno in usb cfs client
00/228800/1
author
INSUN PYO
<insun.pyo@samsung.com>
Wed, 25 Mar 2020 22:29:34 +0000
(07:29 +0900)
committer
INSUN PYO
<insun.pyo@samsung.com>
Wed, 25 Mar 2020 22:29:34 +0000
(07:29 +0900)
Change-Id: Ib091544138444c4108c7b09eb3e70e830661648e
hw/usb_cfs_client_common.c
patch
|
blob
|
history
diff --git
a/hw/usb_cfs_client_common.c
b/hw/usb_cfs_client_common.c
index
0a1990b
..
f03395c
100644
(file)
--- a/
hw/usb_cfs_client_common.c
+++ b/
hw/usb_cfs_client_common.c
@@
-187,13
+187,10
@@
static int cfs_set_gadget_strs(struct cfs_client *cfs_client,
static int cfs_ensure_dir(char *path)
{
- int ret;
-
- ret = mkdir(path, 0770);
- if (ret < 0)
- ret = errno == EEXIST ? 0 : errno;
+ if (mkdir(path, 0770) < 0)
+ return (errno == EEXIST) ? 0 : -errno;
- return
ret
;
+ return
0
;
}