]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/powerplay: remove unnecessary call to memset
authorHimanshu Jha <himanshujha199640@gmail.com>
Mon, 11 Sep 2017 12:37:26 +0000 (18:07 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 12 Sep 2017 18:32:55 +0000 (14:32 -0400)
commit611129fff0c446fed08a42de4f86ce83ed5b0eae
treed6600169624dfdcd057cfd107323e4352305aea7
parentddffec8187487dc9120f6ef2f226d14c10a54a56
drm/amd/powerplay: remove unnecessary call to memset

call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Semantic patch used to resolve this issue:

@@
expression e,e2; constant c;
statement S;
@@

  e = kzalloc(e2, c);
  if(e == NULL) S
- memset(e, 0, e2);

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c