diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2011-03-23 05:16:01 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-03-23 05:15:59 -0400 |
commit | 9a26513eb67ec4b2cb1744834076afad21b68aac (patch) | |
tree | 20062d931215ca303a6f601e32c8d21db73a80ee /drivers/s390/cio | |
parent | 4cc69531f91dfa1668af5e9d8efe9e3bc7b64548 (diff) |
[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 <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, | |||
1508 | 1508 | ||
1509 | if (irq_ptr->state != QDIO_IRQ_STATE_ACTIVE) | 1509 | if (irq_ptr->state != QDIO_IRQ_STATE_ACTIVE) |
1510 | return -EBUSY; | 1510 | return -EBUSY; |
1511 | 1511 | if (!count) | |
1512 | return 0; | ||
1512 | if (callflags & QDIO_FLAG_SYNC_INPUT) | 1513 | if (callflags & QDIO_FLAG_SYNC_INPUT) |
1513 | return handle_inbound(irq_ptr->input_qs[q_nr], | 1514 | return handle_inbound(irq_ptr->input_qs[q_nr], |
1514 | callflags, bufnr, count); | 1515 | callflags, bufnr, count); |