diff options
| author | Krzysztof Opasiak <kopasiak90@gmail.com> | 2017-01-24 03:27:24 +0100 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-01-10 21:02:47 -0800 |
| commit | 825084cdc149b6d624b959699f657c84f598ddf9 (patch) | |
| tree | a4ab93704b1d29b040f6b5a32c5e08b80af012e5 /lib/pm-notifier-error-inject.c | |
| parent | 8e9ed04da37e19dc8523e9a11f13cc0c5d1a072d (diff) | |
usb: gadget: f_hid: fix: Move IN request allocation to set_alt()
commit 749494b6bdbbaf0899aa1c62a1ad74cd747bce47 upstream.
Since commit: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
we cannot allocate any requests in bind() as we check if we should
align request buffer based on endpoint descriptor which is assigned
in set_alt().
Allocating request in bind() function causes a NULL pointer
dereference.
This commit moves allocation of IN request from bind() to set_alt()
to prevent this issue.
Change-Id: I02a832bfd3008efb041450156da11e62f1ec8e5c
Fixes: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
Cc: stable@vger.kernel.org
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 8dd5c0c47332c67a04830e3842d4d6282f1824fd
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions
