spi: limit reaches -1, tested 0
Subsystems (2)
PATCH 1/1 spi: limit reaches -1, tested 0
With a postfix decrement limit will reach -1 rather than 0, so the warning will not be issued.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/spi/spi_imx.c +1 -1
@@ -779,7 +779,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data)/* Read trailing bytes */ limit = loops_per_jiffy <<1 ; -while ((read (drv_data) ==0 ) && limit--); +while ((read (drv_data) ==0 ) && --limit);if (limit ==0 ) dev_err(&drv_data->pdev->dev,
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword