Re: [PATCH] staging: et131x: fix invalid fail after the call to eeprom_wait_ready

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Mark,

will you please ACK or NACK this?

On Thu, Feb 21, 2013 at 12:37 PM, Devendra Naga <devendra.aaru@xxxxxxxxx> wrote:
> should be err < 0 instead of if (err) which actually the read register
> value can be a positive number
>
> Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
> ---
>  drivers/staging/et131x/et131x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
> index 84bbcd4..6bd4a79 100644
> --- a/drivers/staging/et131x/et131x.c
> +++ b/drivers/staging/et131x/et131x.c
> @@ -607,7 +607,7 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data)
>          */
>
>         err = eeprom_wait_ready(pdev, NULL);
> -       if (err)
> +       if (err < 0)
>                 return err;
>
>          /*
> @@ -730,7 +730,7 @@ static int eeprom_read(struct et131x_adapter *adapter, u32 addr, u8 *pdata)
>          */
>
>         err = eeprom_wait_ready(pdev, NULL);
> -       if (err)
> +       if (err < 0)
>                 return err;
>         /*
>          * Write to the LBCIF Control Register:  bit 7=1, bit 6=0, bit 3=0,
> --
> 1.8.1.2
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux