Skip to content

Commit

Permalink
usb: gadget: rndis: don't duplicate the "i" variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrzej Pietrasiewicz authored and Felipe Balbi committed May 21, 2015
1 parent 868055f commit c0d96af
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/usb/gadget/function/rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c0d96af

Please sign in to comment.