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

Commit a5202862 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

greybus: es2: clean up es2 destructor



Now that the host-device is deregistered separately from deallocation,
we can simplify the cport_to_ep-array deallocation.

Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent c1700479
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -550,7 +550,6 @@ static int check_urb_status(struct urb *urb)
static void es2_destroy(struct es2_ap_dev *es2)
{
	struct usb_device *udev;
	int *cport_to_ep;
	int bulk_in;
	int i;

@@ -583,11 +582,11 @@ static void es2_destroy(struct es2_ap_dev *es2)
		}
	}

	kfree(es2->cport_to_ep);

	udev = es2->usb_dev;
	cport_to_ep = es2->cport_to_ep;
	gb_hd_put(es2->hd);

	kfree(cport_to_ep);
	usb_put_dev(udev);
}