usb: phy: mxs: declare variable with initialized value
authorLi Jun <jun.li@nxp.com>
Thu, 21 Jan 2016 07:51:26 +0000 (15:51 +0800)
committerFelipe Balbi <balbi@kernel.org>
Wed, 3 Feb 2016 17:57:41 +0000 (19:57 +0200)
Initialize vbus_value to be 0 since it's possible not to assign
any value before judgement.

Acked-by: Peter Chen <peter.chen@nxp.com
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/phy/phy-mxs-usb.c

index c2936dc48ca7b45b0e5c186859d2879569719323..00bfea01be6501d9b53ccc7975b069c24bc57d7b 100644 (file)
@@ -220,7 +220,7 @@ static int mxs_phy_hw_init(struct mxs_phy *mxs_phy)
 /* Return true if the vbus is there */
 static bool mxs_phy_get_vbus_status(struct mxs_phy *mxs_phy)
 {
-       unsigned int vbus_value;
+       unsigned int vbus_value = 0;
 
        if (!mxs_phy->regmap_anatop)
                return false;