usb-gadget: Add checking return value 23/310123/1 accepted/tizen/7.0/unified/20240423.164429
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 25 Aug 2023 06:07:06 +0000 (15:07 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 23 Apr 2024 02:20:26 +0000 (11:20 +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 7379f52..04ea032 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);