diff options
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index d7fb452af7f9..0c81652eaba6 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -641,7 +641,7 @@ int ipmi_create_user(unsigned int if_num, | |||
641 | return -ENOMEM; | 641 | return -ENOMEM; |
642 | 642 | ||
643 | down_read(&interfaces_sem); | 643 | down_read(&interfaces_sem); |
644 | if ((if_num > MAX_IPMI_INTERFACES) || ipmi_interfaces[if_num] == NULL) | 644 | if ((if_num >= MAX_IPMI_INTERFACES) || ipmi_interfaces[if_num] == NULL) |
645 | { | 645 | { |
646 | rv = -EINVAL; | 646 | rv = -EINVAL; |
647 | goto out_unlock; | 647 | goto out_unlock; |