Fixed regression introduced by remove volatile in
'
a920e66a043 ("char: xilinx_devcfg: Fix warnings in the driver")'
removed volatile around dma_done and error_status without further actions.
This fix prevents these variables from being optimized away without being
read.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
timeout = jiffies + msecs_to_jiffies(1000);
- while (!drvdata->dma_done) {
+ while (!READ_ONCE(drvdata->dma_done)) {
if (time_after(jiffies, timeout)) {
status = -ETIMEDOUT;
goto error;
}
}
- if (drvdata->error_status)
+ if (READ_ONCE(drvdata->error_status))
status = drvdata->error_status;
/* Disable the DMA and error interrupts */