提交 549fb100 编写于 作者: T Tobias Klauser 提交者: Greg Kroah-Hartman

staging: usbip: userspace: Check return value for mkdir()

mkdir() could fail, so we should check its return value.
Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 97c451ca
......@@ -51,7 +51,9 @@ static int record_connection(char *host, char *port, char *busid, int rhport)
char buff[MAX_BUFF+1];
int ret;
mkdir(VHCI_STATE_PATH, 0700);
ret = mkdir(VHCI_STATE_PATH, 0700);
if (ret < 0)
return -1;
snprintf(path, PATH_MAX, VHCI_STATE_PATH"/port%d", rhport);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册