net/enic: fix negative array index write
authorJohn Daley <johndale@cisco.com>
Mon, 20 Jun 2016 19:27:46 +0000 (12:27 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 24 Jun 2016 16:28:09 +0000 (18:28 +0200)
commit4c2c7bf41f5a18d0468197c71b4cc49f49860140
tree028a376944a50dff5efe06a3f5416237dfe10a0d
parent6d04eb4c97cf95562f55b283e5b835dbcdeba78d
net/enic: fix negative array index write

Negative array index write using variable pos as an index to array
enic->fdir.nodes. Fixed by add array index check.

Coverity issue: 13270

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_clsf.c