Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Andrzej Pietrasiewicz and committed by
Felipe Balbi
c0d96af2 868055fd

-1
-1
drivers/usb/gadget/function/rndis.c
··· 934 934 935 935 #ifdef CONFIG_USB_GADGET_DEBUG_FILES 936 936 { 937 - u8 i; 938 937 char name[20]; 939 938 940 939 sprintf(name, NAME_TEMPLATE, i);