summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 5cbc69ff3381..67583692d958 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1785,6 +1785,7 @@ static void
controlvm_periodic_work(struct work_struct *work)
{
struct controlvm_message inmsg;
+ int count = 0;
int err;
/* Drain the RESPONSE queue make it empty */
@@ -1792,7 +1793,7 @@ controlvm_periodic_work(struct work_struct *work)
err = visorchannel_signalremove(chipset_dev->controlvm_channel,
CONTROLVM_QUEUE_RESPONSE,
&inmsg);
- } while (!err);
+ } while ((!err) && (++count < CONTROLVM_MESSAGE_MAX));
if (err != -EAGAIN)
goto schedule_out;