Commit 30a745d9 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Lee Jones
Browse files

usb: renesas_usbhs: gadget: fix unused-but-set-variable warning



commit b7d44c36 upstream.

The commit b8b9c974 ("usb: renesas_usbhs: gadget: disable all eps
when the driver stops") causes the unused-but-set-variable warning.
But, if the usbhsg_ep_disable() will return non-zero value, udc/core.c
doesn't clear the ep->enabled flag. So, this driver should not return
non-zero value, if the pipe is zero because this means the pipe is
already disabled. Otherwise, the ep->enabled flag is never cleared
when the usbhsg_ep_disable() is called by the renesas_usbhs driver first.

Fixes: b8b9c974 ("usb: renesas_usbhs: gadget: disable all eps when the driver stops")
Fixes: 11432050 ("usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()")
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ia5b0dfe060f3152ceecd5d1dfc76e262d846ee7a
parent 6cd86c77
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment