* [PATCH] USB: serial: digi_acceleport: remove redundant assignment to pointer priv
@ 2020-02-08 16:46 Colin King
2020-02-10 9:40 ` Johan Hovold
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-02-08 16:46 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman, linux-usb; +Cc: kernel-janitors, linux-kernel
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(-)
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;
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] USB: serial: digi_acceleport: remove redundant assignment to pointer priv
2020-02-08 16:46 [PATCH] USB: serial: digi_acceleport: remove redundant assignment to pointer priv Colin King
@ 2020-02-10 9:40 ` Johan Hovold
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2020-02-10 9:40 UTC (permalink / raw)
To: Colin King
Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, kernel-janitors,
linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-10 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-08 16:46 [PATCH] USB: serial: digi_acceleport: remove redundant assignment to pointer priv Colin King
2020-02-10 9:40 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).