aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_bt_sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi/ipmi_bt_sm.c')
-rw-r--r--drivers/char/ipmi/ipmi_bt_sm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_bt_sm.c b/drivers/char/ipmi/ipmi_bt_sm.c
index 58dcdee1cd71..0030cd8e2e95 100644
--- a/drivers/char/ipmi/ipmi_bt_sm.c
+++ b/drivers/char/ipmi/ipmi_bt_sm.c
@@ -165,7 +165,7 @@ static int bt_start_transaction(struct si_sm_data *bt,
165{ 165{
166 unsigned int i; 166 unsigned int i;
167 167
168 if ((size < 2) || (size > IPMI_MAX_MSG_LENGTH)) 168 if ((size < 2) || (size > (IPMI_MAX_MSG_LENGTH - 2)))
169 return -1; 169 return -1;
170 170
171 if ((bt->state != BT_STATE_IDLE) && (bt->state != BT_STATE_HOSED)) 171 if ((bt->state != BT_STATE_IDLE) && (bt->state != BT_STATE_HOSED))