Hi

> -----Original Message-----
> From: Felipe Balbi [mailto:bal...@gmail.com] On Behalf Of Felipe Balbi
> Sent: Thursday, February 04, 2016 1:55 AM
> To: Jun Li <jun...@nxp.com>; Peter Chen <peter.c...@nxp.com>;
> hzpeterc...@gmail.com
> Cc: linux-usb@vger.kernel.org; Jun Li <jun...@nxp.com>
> Subject: Re: [PATCH 1/2] usb: phy: mxs: declare variable with initialized
> value
> 
> 
> Hi,
> 
> Li Jun <jun...@nxp.com> writes:
> > Initialize vbus_value to be 0 since it's possible not to assign any
> > value before judgement.
> >
> > Signed-off-by: Li Jun <jun...@nxp.com>
> > ---
> >  drivers/usb/phy/phy-mxs-usb.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/phy/phy-mxs-usb.c
> > b/drivers/usb/phy/phy-mxs-usb.c index c2936dc..00bfea0 100644
> > --- a/drivers/usb/phy/phy-mxs-usb.c
> > +++ b/drivers/usb/phy/phy-mxs-usb.c
> > @@ -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;
> 
> does this fix any warning ?
> 
A code analysis tool(Coverity) gives a reasonable warning, so I fix it.

Li Jun 
> 
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to