diff mbox series

media: pulse8-cec: remove redundant assignment to variable err

Message ID 20190731084210.24911-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show
Series media: pulse8-cec: remove redundant assignment to variable err | expand

Commit Message

Colin King July 31, 2019, 8:42 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable err is being initialized with a value that is never read
and err is being re-assigned a little later on. The assignment is
redundant and hence can be removed.

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

Patch

diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c
index ac88ade94cda..85fc11829758 100644
--- a/drivers/media/usb/pulse8-cec/pulse8-cec.c
+++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c
@@ -640,7 +640,7 @@  static int pulse8_connect(struct serio *serio, struct serio_driver *drv)
 {
 	u32 caps = CEC_CAP_DEFAULTS | CEC_CAP_PHYS_ADDR | CEC_CAP_MONITOR_ALL;
 	struct pulse8 *pulse8;
-	int err = -ENOMEM;
+	int err;
 	struct cec_log_addrs log_addrs = {};
 	u16 pa = CEC_PHYS_ADDR_INVALID;