diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-01-26 16:39:00 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-08 14:12:01 +0100 |
commit | a127f4f228104d391a6aa62a9a57b2ba697f90c2 (patch) | |
tree | 2acd5aba6f20d21420714c8cc4618491ee936d57 /drivers/usb/gadget | |
parent | usb: gadget: udc: change comparison to bitshift when dealing with a mask (diff) | |
download | linux-a127f4f228104d391a6aa62a9a57b2ba697f90c2.tar.xz linux-a127f4f228104d391a6aa62a9a57b2ba697f90c2.zip |
USB: gadget: function: remove redundant initialization of 'tv_nexus'
Pointer tv_nexus is being initialized a value and this is never read
and is later being updated with the same value. Remove the redundant
initialization so that the assignment to tv_nexus is performed later
and more local to when it is being read.
Cleans up clang warning:
drivers/usb/gadget/function/f_tcm.c:1097:25: warning: Value stored to
'tv_nexus' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/function/f_tcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index da81cf16b850..d78dbb73bde8 100644 --- a/drivers/usb/gadget/function/f_tcm.c +++ b/drivers/usb/gadget/function/f_tcm.c @@ -1094,7 +1094,7 @@ static int usbg_submit_command(struct f_uas *fu, struct command_iu *cmd_iu = cmdbuf; struct usbg_cmd *cmd; struct usbg_tpg *tpg = fu->tpg; - struct tcm_usbg_nexus *tv_nexus = tpg->tpg_nexus; + struct tcm_usbg_nexus *tv_nexus; u32 cmd_len; u16 scsi_tag; |