linux/drivers/usb/renesas_usbhs
Arnd Bergmann 672bfdaa31 usb: renesas_usbhs: avoid uninitialized variable use
After the renesas_usbhs driver is enabled in ARM multi_v7_defconfig,
we now get a new warning:

renesas_usbhs/mod.c: In function 'usbhs_interrupt':
renesas_usbhs/mod.c:246:7: warning: 'intenb1' may be used uninitialized in this function [-Wmaybe-uninitialized]

gcc correctly points to a problem here, for the case that the
device is in host mode, we use the intenb1 variable without
having assigned it first. The state->intsts1 has a similar
problem, but gcc cannot know that.

This avoids the problem by initializing both sides of the
comparison to zero when we don't read them from the respective
registers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 88a25e02f3 ("usb: renesas_usbhs: Add access control for INTSTS1 and INTENB1 register")
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-22 08:52:16 -05:00
..
common.c usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
common.h usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
fifo.c usb: renesas_usbhs: Revise the binding document about the dma-names 2015-04-28 11:33:49 -05:00
fifo.h usb: renesas_usbhs: tidyup usbhs_for_each_dfifo macro 2015-04-27 15:48:33 -05:00
Kconfig usb: renesas: fix extcon dependency 2015-02-23 09:14:33 -06:00
Makefile usb: renesas_usbhs: add R-Car Gen. 2 init and power control 2014-07-16 10:06:32 -05:00
mod_gadget.c usb: renesas_usbhs: fix spinlock suspected in a gadget complete function 2015-03-19 11:28:15 -05:00
mod_host.c renesas_usbhs: mod_host: use USB_DT_HUB 2015-04-03 19:03:16 +02:00
mod.c usb: renesas_usbhs: avoid uninitialized variable use 2015-05-22 08:52:16 -05:00
mod.h renesas_usbhs: cleanup quoted includes 2012-06-05 10:15:25 +02:00
pipe.c usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
pipe.h usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
rcar2.c usb: renesas_usbhs: add support for generic PHY 2014-11-03 10:00:56 -06:00
rcar2.h usb: renesas_usbhs: add R-Car Gen. 2 init and power control 2014-07-16 10:06:32 -05:00