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

Commit e5545c9b authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

usb: f_ccid: Assign descriptors only in function bind



Currently we assign the FS, HS and SS descriptors in bind_config
unconditionally. If the max supported speed is high, then bind
function does not allocate SS descriptors but the unbind function
calls usb_free_all_descriptors which results in slab error since
the SS descriptors exist anyway.
Fix this by assigning any function descriptors during bind only.

Change-Id: I83384bd68563e6b94fbb7c1f437282a3fa524de7
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent ddbece73
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1037,9 +1037,6 @@ static int ccid_bind_config(struct f_ccid *ccid_dev)
	pr_debug("ccid_bind_config\n");

	ccid_dev->function.name = FUNCTION_NAME;
	ccid_dev->function.fs_descriptors = ccid_fs_descs;
	ccid_dev->function.hs_descriptors = ccid_hs_descs;
	ccid_dev->function.ss_descriptors = ccid_ss_descs;
	ccid_dev->function.bind = ccid_function_bind;
	ccid_dev->function.unbind = ccid_function_unbind;
	ccid_dev->function.set_alt = ccid_function_set_alt;