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

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
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment