diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
| commit | 9caafa6c8686e319cf4d5f3757b3972c6c522b7c (patch) | |
| tree | b38979b835b5d22e681b175d0b98a3c7560d9c59 /include/linux/i2o.h | |
| parent | 51e9f2ff83df6b1c81c5c44f4486c68ed87aa20e (diff) | |
| parent | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff) | |
Merge branch 'upstream-fixes'
Diffstat (limited to 'include/linux/i2o.h')
| -rw-r--r-- | include/linux/i2o.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9ba806796667..5a9d8c599171 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -1115,9 +1115,11 @@ static inline struct i2o_message *i2o_msg_get(struct i2o_controller *c) | |||
| 1115 | return ERR_PTR(-ENOMEM); | 1115 | return ERR_PTR(-ENOMEM); |
| 1116 | 1116 | ||
| 1117 | mmsg->mfa = readl(c->in_port); | 1117 | mmsg->mfa = readl(c->in_port); |
| 1118 | if (mmsg->mfa == I2O_QUEUE_EMPTY) { | 1118 | if (unlikely(mmsg->mfa >= c->in_queue.len)) { |
| 1119 | mempool_free(mmsg, c->in_msg.mempool); | 1119 | mempool_free(mmsg, c->in_msg.mempool); |
| 1120 | return ERR_PTR(-EBUSY); | 1120 | if(mmsg->mfa == I2O_QUEUE_EMPTY) |
| 1121 | return ERR_PTR(-EBUSY); | ||
| 1122 | return ERR_PTR(-EFAULT); | ||
| 1121 | } | 1123 | } |
| 1122 | 1124 | ||
| 1123 | return &mmsg->msg; | 1125 | return &mmsg->msg; |
