Files
linux-nvgpu/drivers/gpu
Deepak Nibade 8d63a519d9 gpu: nvgpu: pass correct parameter to gp10b_ecc_stat_create()
We pass (struct device_attribute *) to gp10b_ecc_stat_create()
and gr_gp10b_ecc_stat_create() and then assign a memory
allocation to this pointer
But since this pointer is local copy to function, static
pointer variables are never set in gr_gp10b_create_sysfs()

This also results in a resource leak since we never free
the storage assigned to local variable

Fix this by adding and passing correct parameter
(struct device_attribute **) so that the address of the
allocation is returned to the caller correctly

Bug 200291879
Coverity id : 2567934

Change-Id: I1b1d329265f4d32739abbbe3a4e419a2af62b874
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1495907
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-06-06 08:13:43 -07:00
..