diff options
Diffstat (limited to 'drivers/char/ipmi/ipmi_smic_sm.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_smic_sm.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/char/ipmi/ipmi_smic_sm.c b/drivers/char/ipmi/ipmi_smic_sm.c index 39d7e5ef1a2b..e64ea7d25d24 100644 --- a/drivers/char/ipmi/ipmi_smic_sm.c +++ b/drivers/char/ipmi/ipmi_smic_sm.c | |||
@@ -141,12 +141,14 @@ static int start_smic_transaction(struct si_sm_data *smic, | |||
141 | { | 141 | { |
142 | unsigned int i; | 142 | unsigned int i; |
143 | 143 | ||
144 | if ((size < 2) || (size > MAX_SMIC_WRITE_SIZE)) { | 144 | if (size < 2) |
145 | return -1; | 145 | return IPMI_REQ_LEN_INVALID_ERR; |
146 | } | 146 | if (size > MAX_SMIC_WRITE_SIZE) |
147 | if ((smic->state != SMIC_IDLE) && (smic->state != SMIC_HOSED)) { | 147 | return IPMI_REQ_LEN_EXCEEDED_ERR; |
148 | return -2; | 148 | |
149 | } | 149 | if ((smic->state != SMIC_IDLE) && (smic->state != SMIC_HOSED)) |
150 | return IPMI_NOT_IN_MY_STATE_ERR; | ||
151 | |||
150 | if (smic_debug & SMIC_DEBUG_MSG) { | 152 | if (smic_debug & SMIC_DEBUG_MSG) { |
151 | printk(KERN_INFO "start_smic_transaction -"); | 153 | printk(KERN_INFO "start_smic_transaction -"); |
152 | for (i = 0; i < size; i ++) { | 154 | for (i = 0; i < size; i ++) { |