提交 1ee7eead 编写于 作者: G Greg Kroah-Hartman

USB: inode.c: move assignment out of if () block

We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Al Viro <viro@zeniv.linux.org.uk>
CC: Peter Chen <peter.chen@freescale.com>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
CC: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
CC: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NFelipe Balbi <balbi@ti.com>
上级 d544d273
...@@ -769,9 +769,12 @@ ep_config (struct ep_data *data, const char *buf, size_t len) ...@@ -769,9 +769,12 @@ ep_config (struct ep_data *data, const char *buf, size_t len)
if (data->dev->state == STATE_DEV_UNBOUND) { if (data->dev->state == STATE_DEV_UNBOUND) {
value = -ENOENT; value = -ENOENT;
goto gone; goto gone;
} else if ((ep = data->ep) == NULL) { } else {
value = -ENODEV; ep = data->ep;
goto gone; if (ep == NULL) {
value = -ENODEV;
goto gone;
}
} }
switch (data->dev->gadget->speed) { switch (data->dev->gadget->speed) {
case USB_SPEED_LOW: case USB_SPEED_LOW:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册