i40e: use correct structure type name in sizeof
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 30 Jul 2014 03:11:09 +0000 (03:11 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 12 Aug 2014 07:47:50 +0000 (00:47 -0700)
Correct typo in the name of the type given to sizeof.  Because it is the
size of a pointer that is wanted, the typo has no impact on compilation or
execution.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).  The
semantic patch used can be found in message 0 of this patch series.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Tested-By: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 51bc03072ed3dee4e05ec62bc3180c14c44eb3e0..2ac8f45d7c19b3141a71e8c453a90376a9a522e6 100644 (file)
@@ -6293,7 +6293,7 @@ static int i40e_vsi_alloc_arrays(struct i40e_vsi *vsi, bool alloc_qvectors)
 
        if (alloc_qvectors) {
                /* allocate memory for q_vector pointers */
-               size = sizeof(struct i40e_q_vectors *) * vsi->num_q_vectors;
+               size = sizeof(struct i40e_q_vector *) * vsi->num_q_vectors;
                vsi->q_vectors = kzalloc(size, GFP_KERNEL);
                if (!vsi->q_vectors) {
                        ret = -ENOMEM;