From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DF75C433E1 for ; Thu, 20 Aug 2020 11:57:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 504C920855 for ; Thu, 20 Aug 2020 11:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597924646; bh=6JYmNE1719etWcOZy/g0RLlEWmqN+kpABREo5C3bG90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0bUuXx7BH8PrWfFg0O6MpDaLql2RbTp2Th7uWMkGNIyfuHhmdKx/2zCav1eEbj2gq hNG+2B/Dhwb7u2KYZ8IG+7t5ALNP/fsrD8lPcxFdVGiFJB04qx+z+l21EZemnzsLPx SkXeiy+Dezko0z7AA12pTqoWVUlobhRjvaebN5sc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728003AbgHTL5Y (ORCPT ); Thu, 20 Aug 2020 07:57:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:49758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729471AbgHTKA4 (ORCPT ); Thu, 20 Aug 2020 06:00:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4B21D2075E; Thu, 20 Aug 2020 10:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597917656; bh=6JYmNE1719etWcOZy/g0RLlEWmqN+kpABREo5C3bG90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YWT12Bu24rMla/SmT0/uciQgbVRIm9uxErKgFNRnAZyHWDX96n9EHxvuaQ6Ghl8yd kNxHclm053WKI/RLCiSo8v2Z4Ei1+bBUdAzOqDWXLkYyFm142TQ9F/S9+iUqGt1jgZ mUEqBU/vCLfTjesHWP9aD8uQ3uICxWQJ1DMCgs9Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Sumit Semwal , "Rafael J. Wysocki" , Jonathan Corbet , Viresh Kumar , Jani Nikula , Mauro Carvalho Chehab , Eric Miao , Bartlomiej Zolnierkiewicz , Sasha Levin Subject: [PATCH 4.9 110/212] video: pxafb: Fix the function used to balance a dma_alloc_coherent() call Date: Thu, 20 Aug 2020 11:21:23 +0200 Message-Id: <20200820091607.902475322@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091602.251285210@linuxfoundation.org> References: <20200820091602.251285210@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christophe JAILLET [ Upstream commit 499a2c41b954518c372873202d5e7714e22010c4 ] 'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()' not 'dma_free_wc()'. The correct dma_free_ function is already used in the error handling path of the probe function. Fixes: 77e196752bdd ("[ARM] pxafb: allow video memory size to be configurable") Signed-off-by: Christophe JAILLET Cc: Sumit Semwal Cc: Rafael J. Wysocki Cc: Jonathan Corbet Cc: Viresh Kumar Cc: Jani Nikula cc: Mauro Carvalho Chehab Cc: Eric Miao Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200429084505.108897-1-christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin --- drivers/video/fbdev/pxafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 8503310a38167..7f8b6af29aab4 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2447,8 +2447,8 @@ static int pxafb_remove(struct platform_device *dev) free_pages_exact(fbi->video_mem, fbi->video_mem_size); - dma_free_wc(&dev->dev, fbi->dma_buff_size, fbi->dma_buff, - fbi->dma_buff_phys); + dma_free_coherent(&dev->dev, fbi->dma_buff_size, fbi->dma_buff, + fbi->dma_buff_phys); iounmap(fbi->mmio_base); -- 2.25.1