summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_virthub.c
diff options
context:
space:
mode:
authorArnd Bergmann2015-05-22 13:06:35 +0200
committerFelipe Balbi2015-05-22 15:52:16 +0200
commit672bfdaa310004368a0d493478e2a40f2f2f914f (patch)
tree5c60968b0109090b68dad660f05a1f7919a4e38e /drivers/usb/musb/musb_virthub.c
parentusb: gadget: rndis: use signed type for a signed value (diff)
downloadkernel-qcow2-linux-672bfdaa310004368a0d493478e2a40f2f2f914f.tar.gz
kernel-qcow2-linux-672bfdaa310004368a0d493478e2a40f2f2f914f.tar.xz
kernel-qcow2-linux-672bfdaa310004368a0d493478e2a40f2f2f914f.zip
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>
Diffstat (limited to 'drivers/usb/musb/musb_virthub.c')
0 files changed, 0 insertions, 0 deletions