On Sat, Apr 30, 2016 at 10:23:37AM +0300, Dan Carpenter wrote:
> On Sat, Apr 30, 2016 at 01:53:03AM +0100, Salah Triki wrote:
> > The call of eprom_read may fail, therefore its return value must be
> > checked
> > 
> > Signed-off-by: Salah Triki <salah.tr...@acm.org>
> > ---
> >  drivers/staging/rtl8192u/r8192U_core.c | 145 
> > +++++++++++++++++++++++----------
> >  1 file changed, 103 insertions(+), 42 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
> > b/drivers/staging/rtl8192u/r8192U_core.c
> > index 849a95e..6bcbdae 100644
> > --- a/drivers/staging/rtl8192u/r8192U_core.c
> > +++ b/drivers/staging/rtl8192u/r8192U_core.c
> > @@ -2440,9 +2440,13 @@ static void rtl8192_read_eeprom_info(struct 
> > net_device *dev)
> >     struct r8192_priv *priv = ieee80211_priv(dev);
> >     u16 tmpValue = 0;
> >     int i;
> > +   int ret;
> >  
> >     RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
> > -   wEPROM_ID = eprom_read(dev, 0); /* first read EEPROM ID out; */
> > +   ret = eprom_read(dev, 0); /* first read EEPROM ID out; */
> > +   if (ret < 0)
> > +           return;
> > +   wEPROM_ID = (u16)ret;
> 
> 
> Think about this code.  It's completely broken now.
> 
> I'm still not going to review this patchset.


Oops..  Actually you changed this from the previous version so it should
work now.  My bad.

regards,
dan carpenter

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to