diff mbox series

USB: serial: digi_acceleport: remove redundant assignment to pointer priv

Message ID 20200208164601.30032-1-colin.king@canonical.com (mailing list archive)
State Mainlined
Commit 2c0bee081315b18064fe39661e679b2fe6b86476
Headers show
Series USB: serial: digi_acceleport: remove redundant assignment to pointer priv | expand

Commit Message

Colin King Feb. 8, 2020, 4:46 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer priv is being assigned with a value that is never read, it is
assigned a new value later on in a for-loop. The assignment is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/serial/digi_acceleport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johan Hovold Feb. 10, 2020, 9:40 a.m. UTC | #1
On Sat, Feb 08, 2020 at 04:46:01PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer priv is being assigned with a value that is never read, it is
> assigned a new value later on in a for-loop. The assignment is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks.

Johan
diff mbox series

Patch

diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 578ebdd86520..91055a191995 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -1472,7 +1472,7 @@  static int digi_read_oob_callback(struct urb *urb)
 	struct usb_serial_port *port = urb->context;
 	struct usb_serial *serial = port->serial;
 	struct tty_struct *tty;
-	struct digi_port *priv = usb_get_serial_port_data(port);
+	struct digi_port *priv;
 	unsigned char *buf = urb->transfer_buffer;
 	int opcode, line, status, val;
 	unsigned long flags;