diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-14 10:31:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-14 10:31:25 -0800 |
commit | 84b6079134420f4635f23c2088a3892057b23bb0 (patch) | |
tree | ab1cfa2f48abc9b3edc763ac1bc5e243e853981f /drivers/usb | |
parent | 5084fdf081739b7455c7aeecda6d7b83ec59c85f (diff) | |
parent | e16769d4bca67218531505ad1a8365d227fedcf9 (diff) | |
download | linux-84b6079134420f4635f23c2088a3892057b23bb0.tar.gz linux-84b6079134420f4635f23c2088a3892057b23bb0.tar.bz2 linux-84b6079134420f4635f23c2088a3892057b23bb0.zip |
Merge tag 'configfs-for-4.10' of git://git.infradead.org/users/hch/configfs
Pull configfs update from Christoph Hellwig:
"Just one simple change from Andrzej to drop the pointless return value
from the ->drop_link method"
* tag 'configfs-for-4.10' of git://git.infradead.org/users/hch/configfs:
fs: configfs: don't return anything from drop_link
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/configfs.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/function/uvc_configfs.c | 25 |
2 files changed, 8 insertions, 25 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 3984787f8e97..78c44979dde3 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -408,7 +408,7 @@ out: return ret; } -static int config_usb_cfg_unlink( +static void config_usb_cfg_unlink( struct config_item *usb_cfg_ci, struct config_item *usb_func_ci) { @@ -437,12 +437,11 @@ static int config_usb_cfg_unlink( list_del(&f->list); usb_put_function(f); mutex_unlock(&gi->lock); - return 0; + return; } } mutex_unlock(&gi->lock); WARN(1, "Unable to locate function to unbind\n"); - return 0; } static struct configfs_item_operations gadget_config_item_ops = { @@ -865,7 +864,7 @@ out: return ret; } -static int os_desc_unlink(struct config_item *os_desc_ci, +static void os_desc_unlink(struct config_item *os_desc_ci, struct config_item *usb_cfg_ci) { struct gadget_info *gi = container_of(to_config_group(os_desc_ci), @@ -878,7 +877,6 @@ static int os_desc_unlink(struct config_item *os_desc_ci, cdev->os_desc_config = NULL; WARN_ON(gi->composite.gadget_driver.udc_name); mutex_unlock(&gi->lock); - return 0; } static struct configfs_item_operations os_desc_ops = { diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index 31125a4a2658..4e037d2a7a60 100644 --- a/drivers/usb/gadget/function/uvc_configfs.c +++ b/drivers/usb/gadget/function/uvc_configfs.c @@ -547,7 +547,7 @@ out: return ret; } -static int uvcg_control_class_drop_link(struct config_item *src, +static void uvcg_control_class_drop_link(struct config_item *src, struct config_item *target) { struct config_item *control, *header; @@ -555,7 +555,6 @@ static int uvcg_control_class_drop_link(struct config_item *src, struct mutex *su_mutex = &src->ci_group->cg_subsys->su_mutex; struct uvc_descriptor_header **class_array; struct uvcg_control_header *target_hdr; - int ret = -EINVAL; mutex_lock(su_mutex); /* for navigating configfs hierarchy */ @@ -569,23 +568,17 @@ static int uvcg_control_class_drop_link(struct config_item *src, mutex_lock(&opts->lock); class_array = uvcg_get_ctl_class_arr(src, opts); - if (!class_array) - goto unlock; - if (opts->refcnt) { - ret = -EBUSY; + if (!class_array || opts->refcnt) goto unlock; - } target_hdr = to_uvcg_control_header(target); --target_hdr->linked; class_array[0] = NULL; - ret = 0; unlock: mutex_unlock(&opts->lock); out: mutex_unlock(su_mutex); - return ret; } static struct configfs_item_operations uvcg_control_class_item_ops = { @@ -777,7 +770,7 @@ out: return ret; } -static int uvcg_streaming_header_drop_link(struct config_item *src, +static void uvcg_streaming_header_drop_link(struct config_item *src, struct config_item *target) { struct mutex *su_mutex = &src->ci_group->cg_subsys->su_mutex; @@ -786,7 +779,6 @@ static int uvcg_streaming_header_drop_link(struct config_item *src, struct uvcg_streaming_header *src_hdr; struct uvcg_format *target_fmt = NULL; struct uvcg_format_ptr *format_ptr, *tmp; - int ret = -EINVAL; src_hdr = to_uvcg_streaming_header(src); mutex_lock(su_mutex); /* for navigating configfs hierarchy */ @@ -811,8 +803,6 @@ static int uvcg_streaming_header_drop_link(struct config_item *src, out: mutex_unlock(&opts->lock); mutex_unlock(su_mutex); - return ret; - } static struct configfs_item_operations uvcg_streaming_header_item_ops = { @@ -2051,7 +2041,7 @@ out: return ret; } -static int uvcg_streaming_class_drop_link(struct config_item *src, +static void uvcg_streaming_class_drop_link(struct config_item *src, struct config_item *target) { struct config_item *streaming, *header; @@ -2059,7 +2049,6 @@ static int uvcg_streaming_class_drop_link(struct config_item *src, struct mutex *su_mutex = &src->ci_group->cg_subsys->su_mutex; struct uvc_descriptor_header ***class_array; struct uvcg_streaming_header *target_hdr; - int ret = -EINVAL; mutex_lock(su_mutex); /* for navigating configfs hierarchy */ @@ -2076,23 +2065,19 @@ static int uvcg_streaming_class_drop_link(struct config_item *src, if (!class_array || !*class_array) goto unlock; - if (opts->refcnt) { - ret = -EBUSY; + if (opts->refcnt) goto unlock; - } target_hdr = to_uvcg_streaming_header(target); --target_hdr->linked; kfree(**class_array); kfree(*class_array); *class_array = NULL; - ret = 0; unlock: mutex_unlock(&opts->lock); out: mutex_unlock(su_mutex); - return ret; } static struct configfs_item_operations uvcg_streaming_class_item_ops = { |