diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2014-05-21 14:05:35 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 13:27:35 -0500 |
commit | d668b4f3cb43522158987f70b5d7744b583c551d (patch) | |
tree | 94bd000f24dd3b33be7700bdc590bdb5f1303edb /drivers/usb/gadget/f_fs.c | |
parent | 50f741c8dd681410a1bfd822eb8cb0e2ec387539 (diff) |
usb: gadget: FunctionFS: Return -ENOENT instead of -ENODEV when device not found.
Syscall mount returns -ENODEV error if requested FS type
has not been found. Returning the same error from FFS mount
callback makes value returned to userspace misleading.
Other file systems returns -ENOENT if requested device
has not been found. Adjust FFS to this convention to make
error codes meaningfull.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_fs.c')
-rw-r--r-- | drivers/usb/gadget/f_fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 74202d67f911..88d6fa2290fd 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c @@ -2899,12 +2899,12 @@ static void *ffs_acquire_dev(const char *dev_name) ffs_dev = _ffs_find_dev(dev_name); if (!ffs_dev) - ffs_dev = ERR_PTR(-ENODEV); + ffs_dev = ERR_PTR(-ENOENT); else if (ffs_dev->mounted) ffs_dev = ERR_PTR(-EBUSY); else if (ffs_dev->ffs_acquire_dev_callback && ffs_dev->ffs_acquire_dev_callback(ffs_dev)) - ffs_dev = ERR_PTR(-ENODEV); + ffs_dev = ERR_PTR(-ENOENT); else ffs_dev->mounted = true; |