]> www.infradead.org Git - users/dwmw2/linux.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:50:51 +0000 (17:50 +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 2d8f14b69117474d472bca5dcc4f03de8c3e25a9..207435fa4f2c68255a1aec5856e115304f60c496 100644 (file)
@@ -799,7 +799,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;
 }