[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1582697723-7274-1-git-send-email-yangtiezhu@loongson.cn>
Date: Wed, 26 Feb 2020 14:15:22 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Xuefeng Li <lixuefeng@...ngson.cn>
Subject: [PATCH 1/2] USB: core: Fix build warning in usb_get_configuration()
There is no functional issue, just fix the following build warning:
CC drivers/usb/core/config.o
drivers/usb/core/config.c: In function ‘usb_get_configuration’:
drivers/usb/core/config.c:868:6: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int result;
^
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
drivers/usb/core/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index b7918f6..bb63ee0 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -865,7 +865,7 @@ int usb_get_configuration(struct usb_device *dev)
unsigned int cfgno, length;
unsigned char *bigbuffer;
struct usb_config_descriptor *desc;
- int result;
+ int result = 0;
if (ncfg > USB_MAXCONFIG) {
dev_warn(ddev, "too many configurations: %d, "
--
2.1.0
Powered by blists - more mailing lists