提交 c0d96af2 编写于 作者: A Andrzej Pietrasiewicz 提交者: Felipe Balbi

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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 868055fd
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册