summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2016-11-21 12:15:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-23 10:01:57 +0100
commit5d295bc3e7a6478b690b56994fac87728b88157e (patch)
treecf822557421512fc8a10355c064757737560e427 /drivers
parent29b2780974767df4006d9b8cc7d412d23d99e9a7 (diff)
staging: unisys: visorbus: return EAGAIN when empty
It really isn't an error when you call visorchannel_signalremove and there isn't anything in the queue. Just means that the IOSP didn't process anything since the last time you checked. Just inform the caller that it is empty by returning -EAGAIN. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/unisys/visorbus/visorchannel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 738830e3be94..f51a7258bef0 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -237,8 +237,9 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
if (error)
return error;
+ /* No signals to remove; have caller try again. */
if (sig_hdr.head == sig_hdr.tail)
- return -EIO; /* no signals to remove */
+ return -EAGAIN;
sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;