Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
f0b4198f 11fb3799

+2 -2
+2 -2
drivers/usb/serial/mos7720.c
··· 518 518 519 519 static unsigned char parport_mos7715_read_control(struct parport *pp) 520 520 { 521 - struct mos7715_parport *mos_parport = pp->private_data; 521 + struct mos7715_parport *mos_parport; 522 522 __u8 dcr; 523 523 524 524 spin_lock(&release_lock); ··· 554 554 static unsigned char parport_mos7715_read_status(struct parport *pp) 555 555 { 556 556 unsigned char status; 557 - struct mos7715_parport *mos_parport = pp->private_data; 557 + struct mos7715_parport *mos_parport; 558 558 559 559 spin_lock(&release_lock); 560 560 mos_parport = pp->private_data;