OSDN Git Service

drm/amd/powerplay: Don't cast kzalloc() return value
authorGeorgiana Chelu <georgiana.chelu93@gmail.com>
Tue, 17 Oct 2017 20:22:07 +0000 (23:22 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Oct 2017 19:27:22 +0000 (15:27 -0400)
commitbada22d021135374332bc7de59c93761778d7989
tree8b9c54f17f71def46721b47da3cf7efd23f54012
parentd2d7cc330dc1f8ea7cf29dfb7d3ad8bccdcde597
drm/amd/powerplay: Don't cast kzalloc() return value

The kzalloc function returns a void pointer and the assignment
operator converts it to the type of pointer it is assigned to.
Therefore, there is no need to cast.

Issue found by alloc_cast.cocci:
* WARNING: casting value returned by memory allocation function
to <struct type> is useless.

Path to the cocci script: scripts/coccinelle/api/alloc/alloc_cast.cocci

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c