usb: raw-gadget: fix null-ptr-deref when reenabling endpoints
authorAndrey Konovalov <andreyknvl@google.com>
Wed, 13 May 2020 18:01:42 +0000 (20:01 +0200)
committerFelipe Balbi <balbi@kernel.org>
Thu, 14 May 2020 09:35:41 +0000 (12:35 +0300)
commitda39b5ee40bc00ae3edb4ae4e205b10bc52f980e
tree3131e729c83e48986abb873aa888f9071019c3f7
parent61d2658db48af0c563d126cccc5c1105137b1ec9
usb: raw-gadget: fix null-ptr-deref when reenabling endpoints

Currently we preassign gadget endpoints to raw-gadget endpoints during
initialization. Fix resetting this assignment in raw_ioctl_ep_disable(),
otherwise we will get null-ptr-derefs when an endpoint is reenabled.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/legacy/raw_gadget.c