Commit 52033fde authored by Vaibhav Agarwal's avatar Vaibhav Agarwal Committed by Greg Kroah-Hartman

greybus: es2: Release reserved cports CDSI0 and CDSI1

Unique ids were reserved for CDSI0 and CDSI1 during _probe, however
missed to release those ids during disconnect. This causes a memory leak
of 128 bytes for each iteration of unipro_reset. Fix this.
Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 29a822bd
......@@ -869,6 +869,10 @@ static void es2_destroy(struct es2_ap_dev *es2)
kfree(es2->cport_to_ep);
/* release reserved CDSI0 and CDSI1 cports */
gb_hd_cport_release_reserved(es2->hd, ES2_CPORT_CDSI1);
gb_hd_cport_release_reserved(es2->hd, ES2_CPORT_CDSI0);
udev = es2->usb_dev;
gb_hd_put(es2->hd);
......
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