Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2637555pxa; Mon, 17 Aug 2020 15:07:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXLw5+Mtey3z+oI6t9x2ZlDcaLSaVfvY7hooqImFFig7EfA2be31/sQFe0HznkkQ3TKt3R X-Received: by 2002:a17:906:37d1:: with SMTP id o17mr17647291ejc.98.1597702060481; Mon, 17 Aug 2020 15:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702060; cv=none; d=google.com; s=arc-20160816; b=NBk3fcJIAwlRIwpychzi/d/XoHYWQfhN4eh8IHigWL3VyGYOhPADGAmJPhsx9wr3Yd 6OSBGR9iMYftEndqYvcB3fitqkvfyQ6Ewjgl1C/4R7puXkX8EvzSRIi4x8tBlJ7Ndzc1 H8RrQ8geyost2y3VjPGyU5dg7/hK3xhtHF8lBTyYXJggENczkPHm/gB87UTSfoSEIB0p pBhI0Aos+egZFD3/xe5yYhqmfGeL8lHOdBm166LaDQti/Hor67+eJNsKUcticUGl3mBK nGn0ItbQC6XsuUKqvwMfTKpf9tXx/WeSMMc2T52+GYvXJvCYgZcFumIK+sPdclrKzQux AjjQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CJ1NPlqGpC2y5OMnHy/Ki6tn0F3icdYJVuwTYKRLHwA=; b=FEGgOSif5hvV7Z5BUVxpix5bNiEKqjJuFG6jSIOwbu+nbPv4P+nfanY+d2NgbmcP2P +I4CuOcd1IoeWNNZRTGVsQXr4J4HByl9S9eBcscf5hBBulqJ6p3YPDkcGH/6dwa+DWJb JGGWl0slHFgRn137yt7UAhkkYQeWu/iFfKECPv53Ew1kB4D+13eYLcB3bgMp2xmJN+sO 7a8fwRaeezC82PdDmoX9Ns/S1miD4Drh+zZkZRdqcJChn/OgEmeAcQNOzas/Ru8E+p56 qSVaYTO/SWmCcBV4PAnWAoTYrkSKvN90IMvBImACkD/TYGi+FVyfdGyO8cD3cOZFWRYx oqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uxZFeGXB; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si12926297edn.56.2020.08.17.15.07.16; Mon, 17 Aug 2020 15:07:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b=uxZFeGXB; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388122AbgHQQLm (ORCPT + 99 others); Mon, 17 Aug 2020 12:11:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:58532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387545AbgHQPqm (ORCPT ); Mon, 17 Aug 2020 11:46:42 -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 F37A32067C; Mon, 17 Aug 2020 15:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679201; bh=bXOSpFUr15VAm3bVAU/GBKdHAAr5b+vERnYtChHHRIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uxZFeGXB0kKwMqAVY2cF6xu/lQOiUnk6b8klVdyrHVb7KDoohKOUb7McAYwAWMcpn a0tdZVfW/yBhJIVJaq54S/lxz+1PT0walA2U9lWvDrlIEYVKhB0OxUJf8TK7mdwptW gspuaxdpiRBgulauzfKArHOc77zonkUNcpsP2pZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Sudip Mukherjee , Teddy Wang , Dejin Zheng , Bartlomiej Zolnierkiewicz , Sasha Levin Subject: [PATCH 5.7 131/393] video: fbdev: sm712fb: fix an issue about iounmap for a wrong address Date: Mon, 17 Aug 2020 17:13:01 +0200 Message-Id: <20200817143825.963891853@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dejin Zheng [ Upstream commit 98bd4f72988646c35569e1e838c0ab80d06c77f6 ] the sfb->fb->screen_base is not save the value get by iounmap() when the chip id is 0x720. so iounmap() for address sfb->fb->screen_base is not right. Fixes: 1461d6672864854 ("staging: sm7xxfb: merge sm712fb with fbdev") Cc: Andy Shevchenko Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Greg Kroah-Hartman Signed-off-by: Dejin Zheng Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200422160719.27763-1-zhengdejin5@gmail.com Signed-off-by: Sasha Levin --- drivers/video/fbdev/sm712fb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index 6a1b4a853d9ee..8cd655d6d6280 100644 --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1429,6 +1429,8 @@ static int smtc_map_smem(struct smtcfb_info *sfb, static void smtc_unmap_smem(struct smtcfb_info *sfb) { if (sfb && sfb->fb->screen_base) { + if (sfb->chip_id == 0x720) + sfb->fb->screen_base -= 0x00200000; iounmap(sfb->fb->screen_base); sfb->fb->screen_base = NULL; } -- 2.25.1