i40iw: Use correct src address in memcpy to rdma stats counters

hw_stats is a pointer to i40_iw_dev_stats struct in i40iw_get_hw_stats().
Use hw_stats and not &hw_stats in the memcpy to copy the i40iw device stats
data into rdma_hw_stats counters.

Fixes: b40f4757da ("IB/core: Make device counter infrastructure dynamic")

Cc: stable@vger.kernel.org # 4.7+
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Shiraz Saleem 2016-11-11 10:55:41 -06:00 committed by Doug Ledford
parent 5e58917122
commit 91c42b72f8

View file

@ -2646,7 +2646,7 @@ static int i40iw_get_hw_stats(struct ib_device *ibdev,
return -ENOSYS;
}
memcpy(&stats->value[0], &hw_stats, sizeof(*hw_stats));
memcpy(&stats->value[0], hw_stats, sizeof(*hw_stats));
return stats->num_counters;
}