Commit 9d9a7614 authored by Jon Hunter's avatar Jon Hunter Committed by Greg Kroah-Hartman

usb: gadget: tegra-xudc: Remove unneeded return variable

The 'ret' variable in the function tegra_xudc_gadget_vbus_draw() is not
needed and so remove this variable.
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20230405181854.42355-2-jonathanh@nvidia.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5629d319
......@@ -2162,15 +2162,14 @@ static int tegra_xudc_gadget_stop(struct usb_gadget *gadget)
static int tegra_xudc_gadget_vbus_draw(struct usb_gadget *gadget,
unsigned int m_a)
{
int ret = 0;
struct tegra_xudc *xudc = to_xudc(gadget);
dev_dbg(xudc->dev, "%s: %u mA\n", __func__, m_a);
if (xudc->curr_usbphy && xudc->curr_usbphy->chg_type == SDP_TYPE)
ret = usb_phy_set_power(xudc->curr_usbphy, m_a);
return usb_phy_set_power(xudc->curr_usbphy, m_a);
return ret;
return 0;
}
static int tegra_xudc_set_selfpowered(struct usb_gadget *gadget, int is_on)
......
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