From: Arnd Bergmann Date: Fri, 22 May 2015 11:06:35 +0000 (+0200) Subject: usb: renesas_usbhs: avoid uninitialized variable use X-Git-Tag: omap-for-v4.2/fixes-rc1^2~90^2~16^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=672bfdaa310004368a0d493478e2a40f2f2f914f;p=pandora-kernel.git 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 Fixes: 88a25e02f3 ("usb: renesas_usbhs: Add access control for INTSTS1 and INTENB1 register") Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed