linux/drivers/usb/typec
Colin Ian King 707a123d7a usb: typec: wcove: fix uninitialized usbc_irq1 and usbc_irq2
Calls to regmap_read may fail with an -EINVAL return without setting
usbc_irq1 and usbc_irq2.  The error handling clean up expects these
to have been set (or zero on a failure) and currently may try to
clear the wrong IRQs if the uninitalized garbage values in usbc_irq1
or usbc_irq2 are non-zero.  The simplest fix is to ensure these
variables are initialized to zero.

Detected by CoverityScan, CID#1457737 ("Uninitialized scalar variable")

Fixes: 3c4fb9f169 ("usb: typec: wcove: start using tcpm for USB PD support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-17 11:56:12 +02:00
..
fusb302 usb: typec: fusb302: Move out of staging 2017-09-18 10:58:31 +02:00
ucsi usb: typec: include linux/device.h in ucsi.h 2017-07-17 13:11:56 +02:00
Kconfig usb: typec: driver for TI TPS6598x USB Power Delivery controllers 2017-10-04 09:57:57 +02:00
Makefile usb: typec: driver for TI TPS6598x USB Power Delivery controllers 2017-10-04 09:57:57 +02:00
tcpm.c usb: typec: tcpm: reset the port on removal 2017-10-17 11:56:11 +02:00
tps6598x.c usb: typec: driver for TI TPS6598x USB Power Delivery controllers 2017-10-04 09:57:57 +02:00
typec_wcove.c usb: typec: wcove: fix uninitialized usbc_irq1 and usbc_irq2 2017-10-17 11:56:12 +02:00
typec.c usb: typec: Add a sysfs node to manage port type 2017-06-03 18:02:58 +09:00