mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
VFIO: platform: reset: fix a warning message condition
This loop ends with count set to -1 and not zero so the warning message
isn't printed when it should be. I've fixed this by change the postop
to a preop.
Fixes: 0990822c98 ('VFIO: platform: reset: AMD xgbe reset module')
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
This commit is contained in:
parent
4ef7675344
commit
967628827f
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev)
|
|||
usleep_range(10, 15);
|
||||
|
||||
count = 2000;
|
||||
while (count-- && (ioread32(xgmac_regs->ioaddr + DMA_MR) & 1))
|
||||
while (--count && (ioread32(xgmac_regs->ioaddr + DMA_MR) & 1))
|
||||
usleep_range(500, 600);
|
||||
|
||||
if (!count)
|
||||
|
|
|
|||
Loading…
Reference in a new issue