enic: fix crash when allocating too many queues
authorNelson Escobar <neescoba@cisco.com>
Thu, 17 Mar 2016 22:49:58 +0000 (15:49 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Mar 2016 17:56:44 +0000 (18:56 +0100)
commitddf2da3ecec97a316838f40fe13e217afafc6252
tree6657cfc5062149ba6781d9d4499d1bbc047f92f8
parentbba57df3861c644e98c5e8f79e62f6ca5074cb40
enic: fix crash when allocating too many queues

Add checks to make sure we don't try to allocate more tx or rx queues
than we support.

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_ethdev.c