summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorGustavo A R Silva <garsilva@embeddedor.com>2017-10-18 22:34:25 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-11-27 22:50:35 +0100
commitc30bf8cecebabb119aa1fbb17de84f924a8ab8f7 (patch)
tree46fa929e068861bba227fec36f45498fa6d8a9a6 /drivers/net/ethernet
parentMerge tag 'mac80211-for-davem-2017-11-27' of git://git.kernel.org/pub/scm/lin... (diff)
downloadlinux-c30bf8cecebabb119aa1fbb17de84f924a8ab8f7.tar.xz
linux-c30bf8cecebabb119aa1fbb17de84f924a8ab8f7.zip
i40e/virtchnl: fix application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of the pointer. The proper fix in this particular case is to code sizeof(*vfres) instead of sizeof(vfres). This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A R Silva <garsilva@embeddedor.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index a3dc9b932946..36cb8e068e85 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2086,7 +2086,7 @@ static int i40e_vc_request_queues_msg(struct i40e_vf *vf, u8 *msg, int msglen)
}
return i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_REQUEST_QUEUES, 0,
- (u8 *)vfres, sizeof(vfres));
+ (u8 *)vfres, sizeof(*vfres));
}
/**