Commit e3a5cd9e authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller
Browse files

[NET]: Fix an off-by-21-or-49 error.

This patch fixes an off-by-21-or-49 error ;-) spotted by the Coverity
Signed-off-by: default avatarAdrian Bunk <>
Signed-off-by: default avatarDavid S. Miller <>
parent d938ab44
......@@ -165,7 +165,7 @@ static ssize_t show_operstate(struct class_device *dev, char *buf)
operstate = IF_OPER_DOWN;
if (operstate >= sizeof(operstates))
if (operstate >= ARRAY_SIZE(operstates))
return -EINVAL; /* should not happen */
return sprintf(buf, "%s\n", operstates[operstate]);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment