Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ee7eead authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarAlan Stern <stern@rowland.harvard.edu>
CC: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
CC: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
parent d544d273
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -769,10 +769,13 @@ ep_config (struct ep_data *data, const char *buf, size_t len)
	if (data->dev->state == STATE_DEV_UNBOUND) {
		value = -ENOENT;
		goto gone;
	} else if ((ep = data->ep) == NULL) {
	} else {
		ep = data->ep;
		if (ep == NULL) {
			value = -ENODEV;
			goto gone;
		}
	}
	switch (data->dev->gadget->speed) {
	case USB_SPEED_LOW:
	case USB_SPEED_FULL: