Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: fix returnvar.cocci warnings

Remove unneeded variables when "0" can be returned.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Vivek Gautam and committed by
Kishon Vijay Abraham I
e4d5973f 045ef311

+2 -4
+1 -2
drivers/phy/phy-berlin-sata.c
··· 85 85 struct phy_berlin_desc *desc = phy_get_drvdata(phy); 86 86 struct phy_berlin_priv *priv = dev_get_drvdata(phy->dev.parent); 87 87 void __iomem *ctrl_reg = priv->base + 0x60 + (desc->index * 0x80); 88 - int ret = 0; 89 88 u32 regval; 90 89 91 90 clk_prepare_enable(priv->clk); ··· 129 130 130 131 clk_disable_unprepare(priv->clk); 131 132 132 - return ret; 133 + return 0; 133 134 } 134 135 135 136 static int phy_berlin_sata_power_off(struct phy *phy)
+1 -2
drivers/phy/tegra/xusb-tegra124.c
··· 1483 1483 struct tegra_xusb_padctl *padctl = port->padctl; 1484 1484 struct tegra_xusb_lane *lane = usb3->base.lane; 1485 1485 unsigned int index = port->index, offset; 1486 - int ret = 0; 1487 1486 u32 value; 1488 1487 1489 1488 value = padctl_readl(padctl, XUSB_PADCTL_SS_PORT_MAP); ··· 1611 1612 value &= ~XUSB_PADCTL_ELPG_PROGRAM_SSPX_ELPG_CLAMP_EN(index); 1612 1613 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM); 1613 1614 1614 - return ret; 1615 + return 0; 1615 1616 } 1616 1617 1617 1618 static void tegra124_usb3_port_disable(struct tegra_xusb_port *port)