diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2016-05-31 15:17:21 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-21 11:04:09 +0300 |
commit | 872ce5119524f33fafacc4d9610a431185ea66a2 (patch) | |
tree | 90d92795546becea120a08658d1a256a6d6ab534 /drivers/usb/gadget/legacy/g_ffs.c | |
parent | 9522def40065194aa75b0a7b7e1ff5b8e2014724 (diff) | |
download | linux-872ce5119524f33fafacc4d9610a431185ea66a2.tar.xz |
usb: gadget: fix unused-but-set-variale warnings
Those are enabled with W=1 make option.
The patch leaves of some type-limits warnings which are caused by
generic macros used in a way where they produce always-false
conditions.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/legacy/g_ffs.c')
-rw-r--r-- | drivers/usb/gadget/legacy/g_ffs.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/usb/gadget/legacy/g_ffs.c b/drivers/usb/gadget/legacy/g_ffs.c index f85639ef8a8f..6da7316f8e87 100644 --- a/drivers/usb/gadget/legacy/g_ffs.c +++ b/drivers/usb/gadget/legacy/g_ffs.c @@ -265,7 +265,7 @@ static void *functionfs_acquire_dev(struct ffs_dev *dev) { if (!try_module_get(THIS_MODULE)) return ERR_PTR(-ENOENT); - + return NULL; } @@ -275,7 +275,7 @@ static void functionfs_release_dev(struct ffs_dev *dev) } /* - * The caller of this function takes ffs_lock + * The caller of this function takes ffs_lock */ static int functionfs_ready_callback(struct ffs_data *ffs) { @@ -294,12 +294,12 @@ static int functionfs_ready_callback(struct ffs_data *ffs) ++missing_funcs; gfs_registered = false; } - + return ret; } /* - * The caller of this function takes ffs_lock + * The caller of this function takes ffs_lock */ static void functionfs_closed_callback(struct ffs_data *ffs) { @@ -347,17 +347,14 @@ static int gfs_bind(struct usb_composite_dev *cdev) #ifdef CONFIG_USB_FUNCTIONFS_RNDIS { - struct f_rndis_opts *rndis_opts; - fi_rndis = usb_get_function_instance("rndis"); if (IS_ERR(fi_rndis)) { ret = PTR_ERR(fi_rndis); goto error; } - rndis_opts = container_of(fi_rndis, struct f_rndis_opts, - func_inst); #ifndef CONFIG_USB_FUNCTIONFS_ETH - net = rndis_opts->net; + net = container_of(fi_rndis, struct f_rndis_opts, + func_inst)->net; #endif } #endif |