summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorColin Ian King2018-01-17 12:54:27 +0100
committerGreg Kroah-Hartman2018-01-22 15:34:37 +0100
commitf0b4198f0727dd758a6ef34eca938c559b5d5ae5 (patch)
tree139f95825fbf0cbdae1718a307383aefeb07c29d /drivers/usb/serial
parentusb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc() (diff)
downloadkernel-qcow2-linux-f0b4198f0727dd758a6ef34eca938c559b5d5ae5.tar.gz
kernel-qcow2-linux-f0b4198f0727dd758a6ef34eca938c559b5d5ae5.tar.xz
kernel-qcow2-linux-f0b4198f0727dd758a6ef34eca938c559b5d5ae5.zip
USB: serial: remove redundant initializations of 'mos_parport'
The pointer mos_parport is being initialized to pp->private_data and then the assignment is duplicated after a spin lock. Remove the initialization as it occurs before the spin lock and it is a redundant assignment. Cleans up clang warnings: drivers/usb/serial/mos7720.c:521:26: warning: Value stored to 'mos_parport' during its initialization is never read drivers/usb/serial/mos7720.c:557:26: warning: Value stored to 'mos_parport' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/mos7720.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index f4df3d5bf69c..bd57630e67e2 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -518,7 +518,7 @@ static void parport_mos7715_write_control(struct parport *pp, unsigned char d)
static unsigned char parport_mos7715_read_control(struct parport *pp)
{
- struct mos7715_parport *mos_parport = pp->private_data;
+ struct mos7715_parport *mos_parport;
__u8 dcr;
spin_lock(&release_lock);
@@ -554,7 +554,7 @@ static unsigned char parport_mos7715_frob_control(struct parport *pp,
static unsigned char parport_mos7715_read_status(struct parport *pp)
{
unsigned char status;
- struct mos7715_parport *mos_parport = pp->private_data;
+ struct mos7715_parport *mos_parport;
spin_lock(&release_lock);
mos_parport = pp->private_data;