Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2312762ybg; Fri, 5 Jun 2020 10:40:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkMgPbNkxIvNQRoUiGaC0N3t/MBSmstGFG823PFVaTq6BhvobwTlt63xvsdlE7+XzmbQ0K X-Received: by 2002:a17:906:57d3:: with SMTP id u19mr10034570ejr.401.1591378818078; Fri, 05 Jun 2020 10:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591378818; cv=none; d=google.com; s=arc-20160816; b=W31x2/o+AewIWpk3MaMiKzeWSfxXjeO66A0duyAz8wKl1S+jn65z894rJuEvY/CsWk NHKisO4vp+jQSL3gQyweAhu6KV6uav3XzZywDVzUTWnB3WpJZwNGzaZfOezx1TI+/gaT HsMXrWN1ZGMBbQP8tiMeGlCRVkypX4kQ6GD8pq+yY70P1pV49vVXf3wf5f3ffhC5ical hudqAeZajQeGpiCKWae8NiczH4A8CmfoIKn32u5kXB1sUNEvTtcb3gRIykW7ip6g+TUz 4WzhCidxOcZsrUGE/vdMGUXwNHZ91/yp1oEvqyguY0Yny57sR6VSn5/NhTILo987rZDP D5ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=v2RPwevKzEvUOUonTwAkZLpeDUxhkeZo2zDozwoA/PY=; b=I8dcj7aeMGSluiUnAauuF7dvuwgWGd0i8k6JFJ5+Wb5UbO4f/u/CovfIukxV/N5OI6 MKYJT21HiF978SXP4Hr6TaPUL1+iw2HfvPhuk4l+8+Jn3KweMDWbB8FzN2rSO+xkitb5 dORUBIEjPekfveMJWi0J1k6wmm/1wWAFQeWBJxrtTL1IFomQUZL7HLezQbhSP/3PoC+8 416HuUXe00FzZG1ZNvK48nCliBBPMmNK6ziz0o87qzbXpnnjHhb6YlBYHUA8uPWo1bSq ztJFTY6PYP0DQe09/9c1GrdzkVUhhUDEWl35lnCpqE4VVlrVclLMJLrlPJfJu0RKFZeR GjQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si4220370edf.484.2020.06.05.10.39.54; Fri, 05 Jun 2020 10:40:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727932AbgFERiB (ORCPT + 99 others); Fri, 5 Jun 2020 13:38:01 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40086 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgFERiB (ORCPT ); Fri, 5 Jun 2020 13:38:01 -0400 Received: by mail-lj1-f193.google.com with SMTP id n23so12750545ljh.7; Fri, 05 Jun 2020 10:37:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v2RPwevKzEvUOUonTwAkZLpeDUxhkeZo2zDozwoA/PY=; b=edgK7UbIzb8CDwpqmcKIOqC+paR6c3+NWEbiJ8uCyeEWHtpkmsdQZokdU6tbBrx52i m8hBeXSDOCbMi4U97UCZwC2T3JotyBDA6PPJk5jbsccTiMeGWxFXyMboYevNZPOafAKq EbXD6SwneA0BNGtEx0SWrfpFgMzO7mK72tscaBXevScqLzoyrI8aFrunP76Tuus1venU WYXKtPQHaFdcCY0J0uSlAN0LLNzhbMVw+EyvLdJcD/eaHIdK3UkWCyj2rfUemL5Ioyc+ T8kQn42zskGFxlQGzr0uuVK4s9hyrA5qg/YIX9yPOXCpwb15qA6z9Rs4pXFXwpN7wDoi kFDA== X-Gm-Message-State: AOAM531Zkgs791X2Zc3NDe4RWxMpW+KH9w6TMorA85h9IK0rxbigtlnV 2yXliENG2rpPyWoG6vXIZ+dNFEC0Fuw= X-Received: by 2002:a2e:7c03:: with SMTP id x3mr1433951ljc.227.1591378678627; Fri, 05 Jun 2020 10:37:58 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id w1sm1049514ljo.80.2020.06.05.10.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 10:37:57 -0700 (PDT) From: Denis Efremov To: Leo Li Cc: Denis Efremov , David Airlie , Daniel Vetter , Krunoslav Kovac , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma() Date: Fri, 5 Jun 2020 20:37:43 +0300 Message-Id: <20200605173744.68500-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c index 9431b48aecb4..56bb1f9f77ce 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -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; } -- 2.26.2