Commit 549fb100 authored by Tobias Klauser's avatar Tobias Klauser Committed by Greg Kroah-Hartman

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

mkdir() could fail, so we should check its return value.
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment