From 53d534724ae704cb4e1990230add8baa11b44204 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 30 Aug 2017 17:39:51 +0000 Subject: [PATCH] bhnd: initialize variable before use Reported by: Clang MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/bhnd/cores/usb/bhnd_usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/bhnd/cores/usb/bhnd_usb.c b/sys/dev/bhnd/cores/usb/bhnd_usb.c index 4e88c4a8f94f..694497b0b04c 100644 --- a/sys/dev/bhnd/cores/usb/bhnd_usb.c +++ b/sys/dev/bhnd/cores/usb/bhnd_usb.c @@ -162,9 +162,8 @@ bhnd_usb_attach(device_t dev) if ( bhnd_get_device(dev) == BHND_COREID_USB20H) { - uint32_t rev; + uint32_t rev = bhnd_get_hwrev(dev); BHND_INFO_DEV(dev, "USB HOST 2.0 setup for rev %d", rev); - rev = bhnd_get_hwrev(dev); if (rev == 1/* ? == 2 */) { /* SiBa code */