staging: hikey9xx: Fix incorrect assignment
authorAlex Dewar <alex.dewar90@gmail.com>
Mon, 21 Sep 2020 21:21:47 +0000 (22:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Sep 2020 07:51:28 +0000 (09:51 +0200)
In hi3670_phy_probe(), when reading property tx-vboost-lvl fails, its
default value is assigned to priv->eye_diagram_param, rather than to
priv->tx_vboost_lvl. Fix this.

Fixes: 8971a3b880b2 ("staging: hikey9xx: add USB physical layer for Kirin 3670")
Addresses-Coverity: CID 1497107: Incorrect expression (COPY_PASTE_ERROR)
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Link: https://lore.kernel.org/r/20200921212146.34662-1-alex.dewar90@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/hikey9xx/phy-hi3670-usb3.c

index 42dbc20a0b9aa82d298b9ce9acdb929eff1e68b7..4fc013911a7874d7a33cded94564af737c2c236f 100644 (file)
@@ -640,7 +640,7 @@ static int hi3670_phy_probe(struct platform_device *pdev)
 
        if (of_property_read_u32(dev->of_node, "hisilicon,tx-vboost-lvl",
                                 &priv->tx_vboost_lvl))
-               priv->eye_diagram_param = KIRIN970_USB_DEFAULT_PHY_VBOOST;
+               priv->tx_vboost_lvl = KIRIN970_USB_DEFAULT_PHY_VBOOST;
 
        phy = devm_phy_create(dev, NULL, &hi3670_phy_ops);
        if (IS_ERR(phy))