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

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

USB: hub.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.

Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
CC: Dan Williams <dan.j.williams@intel.com>
CC: Petr Mladek <pmladek@suse.cz>
CC: Peter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
parent c688d621
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -795,7 +795,8 @@ int usb_hub_clear_tt_buffer(struct urb *urb)
	 * since each TT has "at least two" buffers that can need it (and
	 * there can be many TTs per hub).  even if they're uncommon.
	 */
	if ((clear = kmalloc (sizeof *clear, GFP_ATOMIC)) == NULL) {
	clear = kmalloc(sizeof *clear, GFP_ATOMIC);
	if (clear == NULL) {
		dev_err (&udev->dev, "can't save CLEAR_TT_BUFFER state\n");
		/* FIXME recover somehow ... RESET_TT? */
		return -ENOMEM;