diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-11-04 18:55:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-11-04 20:35:18 -0800 |
commit | a52028626accc2ae26c9ce03ec7bba68146b8456 (patch) | |
tree | 09dc31bdb9e3bad24ef6c668e5cbfe570104b288 /drivers/staging/greybus/es2.c | |
parent | c1700479845bc36cb48719b2ae341d4df89a73f6 (diff) | |
download | op-kernel-dev-a52028626accc2ae26c9ce03ec7bba68146b8456.zip op-kernel-dev-a52028626accc2ae26c9ce03ec7bba68146b8456.tar.gz |
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: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/es2.c')
-rw-r--r-- | drivers/staging/greybus/es2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index aad6451..c1a6fe4 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -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); } |