Commit f0b4198f authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 11fb3799
...@@ -518,7 +518,7 @@ static void parport_mos7715_write_control(struct parport *pp, unsigned char d) ...@@ -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) 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; __u8 dcr;
spin_lock(&release_lock); spin_lock(&release_lock);
...@@ -554,7 +554,7 @@ static unsigned char parport_mos7715_frob_control(struct parport *pp, ...@@ -554,7 +554,7 @@ static unsigned char parport_mos7715_frob_control(struct parport *pp,
static unsigned char parport_mos7715_read_status(struct parport *pp) static unsigned char parport_mos7715_read_status(struct parport *pp)
{ {
unsigned char status; unsigned char status;
struct mos7715_parport *mos_parport = pp->private_data; struct mos7715_parport *mos_parport;
spin_lock(&release_lock); spin_lock(&release_lock);
mos_parport = pp->private_data; mos_parport = pp->private_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment