From: Andrzej Pietrasiewicz Date: Mon, 18 May 2015 15:40:03 +0000 (+0200) Subject: usb: gadget: rndis: don't duplicate the "i" variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0d96af2e0427cc90b1f0d3c6a5294d90f93fcf4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: rndis: don't duplicate the "i" variable If CONFIG_USB_GADGET_DEBUG_FILES is set then a block is opened and inside it there is a local variable "i" which hides the "i" local to the rndis_deregister(). Consequently, a random value is formatted into the "name" buffer. This patch removes the block-local i. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/function/rndis.c b/drivers/usb/gadget/function/rndis.c index f626a63bbdba..aac59c03a732 100644 --- a/drivers/usb/gadget/function/rndis.c +++ b/drivers/usb/gadget/function/rndis.c @@ -934,7 +934,6 @@ void rndis_deregister(struct rndis_params *params) #ifdef CONFIG_USB_GADGET_DEBUG_FILES { - u8 i; char name[20]; sprintf(name, NAME_TEMPLATE, i);