drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp()
authorDenis Efremov <efremov@linux.com>
Fri, 5 Jun 2020 17:37:44 +0000 (20:37 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Jun 2020 22:00:24 +0000 (18:00 -0400)
Use kfree() instead of kvfree() to free rgb_user in
calculate_user_regamma_ramp() because the memory is allocated with
kcalloc().

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c

index 56bb1f9..bcfe34e 100644 (file)
@@ -1777,7 +1777,7 @@ bool calculate_user_regamma_ramp(struct dc_transfer_func *output_tf,
 
        kfree(rgb_regamma);
 rgb_regamma_alloc_fail:
-       kvfree(rgb_user);
+       kfree(rgb_user);
 rgb_user_alloc_fail:
        return ret;
 }