On Thu, Apr 28, 2016 at 06:53:14PM +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 | 147 
> +++++++++++++++++++++++----------
>  1 file changed, 104 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
> b/drivers/staging/rtl8192u/r8192U_core.c
> index 3a93218..1c09c61 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -2432,6 +2432,7 @@ static inline u16 endian_swap(u16 *data)
>       *data = (tmp >> 8) | (tmp << 8);
>       return *data;
>  }
> +

Unrelated change.

>  static void rtl8192_read_eeprom_info(struct net_device *dev)
>  {
>       u16 wEPROM_ID = 0;
> @@ -2440,9 +2441,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)
> +             return;
> +     wEPROM_ID = (u16)ret;


This is wrong and nonsense.

I'm not reviewing the rest of the patch series.

regards,
dan carpenter

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

Reply via email to