usb-gadget: Add checking return value 31/297831/1 accepted/tizen/unified/20230829.181412
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 25 Aug 2023 06:07:06 +0000 (15:07 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Fri, 25 Aug 2023 06:08:01 +0000 (15:08 +0900)
Add checking return value to fix static anlaysis issue.

Change-Id: I0027cc102f5e1b6c1731d7d15d49254bcd4608aa
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/usb-gadget/usb-gadget-cfs-ops.c

index 08ed2f4087fa551cbc6b0d3e258fd4b686a9995e..d9da56bce57e7df2c6312e4103db17737b565c2e 100644 (file)
@@ -235,7 +235,9 @@ static int cfs_prep_ffs_service(struct usb_function *usb_func, usbg_function *fu
        return 0;
 
 out_unmount:
-       umount(buf);
+       ret = umount(buf);
+       if (ret < 0)
+               _W("Failed to umount %s", buf);
 
 out_rmdir:
        snprintf(buf, sizeof(buf), "%s/%s/%s", USB_FUNCS_PATH, name, instance);