]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Use kvfree() to free coeff in build_regamma()
authorDenis Efremov <efremov@linux.com>
Fri, 5 Jun 2020 17:37:43 +0000 (20:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:22 +0000 (17:49 +0200)
commit 81921a828b94ce2816932c19a5ec74d302972833 upstream.

Use kvfree() instead of kfree() to free coeff in build_regamma()
because the memory is allocated with kvzalloc().

Fixes: e752058b8671 ("drm/amd/display: Optimize gamma calculations")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c

index cac09d500fda938daa5899f44f0bdc87a2725ea5..e89694eb90b4c2bdf27544b28cf93f94cb85a0d5 100644 (file)
@@ -843,7 +843,7 @@ static bool build_regamma(struct pwl_float_data_ex *rgb_regamma,
        pow_buffer_ptr = -1; // reset back to no optimize
        ret = true;
 release:
-       kfree(coeff);
+       kvfree(coeff);
        return ret;
 }