From 9a26513eb67ec4b2cb1744834076afad21b68aac Mon Sep 17 00:00:00 2001 From: Jan Glauber Date: Wed, 23 Mar 2011 10:16:01 +0100 Subject: [PATCH] [S390] qdio: prevent handling of buffers if count is zero Exit do_QDIO early if the buffer count is zero to prevent side effects in the following functions. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/qdio_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 5640c89cd9de..479c665e9e7c 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -1508,7 +1508,8 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags, if (irq_ptr->state != QDIO_IRQ_STATE_ACTIVE) return -EBUSY; - + if (!count) + return 0; if (callflags & QDIO_FLAG_SYNC_INPUT) return handle_inbound(irq_ptr->input_qs[q_nr], callflags, bufnr, count); -- 2.20.1