Message ID | 20230405181854.42355-2-jonathanh@nvidia.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
On Wed, Apr 05, 2023 at 07:18:54PM +0100, Jon Hunter wrote: > The 'ret' variable in the function tegra_xudc_gadget_vbus_draw() is not > needed and so remove this variable. > > Signed-off-by: Jon Hunter <jonathanh@nvidia.com> > --- > drivers/usb/gadget/udc/tegra-xudc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Thierry Reding <treding@nvidia.com>
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index 5bccd64847ff..34e9c1df54c7 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -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)
The 'ret' variable in the function tegra_xudc_gadget_vbus_draw() is not needed and so remove this variable. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> --- drivers/usb/gadget/udc/tegra-xudc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)