From patchwork Tue May 18 14:11:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 12264867 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 A2A40C433ED for ; Tue, 18 May 2021 14:11:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 681ED6117A for ; Tue, 18 May 2021 14:11:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 681ED6117A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MPQ8NIB8uMA3AOw/iyCmQMdGAw5iYkfriTba1PLmY8Q=; b=HXXUU7nlRnA5O88CFbPOyqC9lJ 23gBnISD/FOfhKVqDoCAIioNcgR+9BZd8PkEFZB/eqAfIoIL57Wkjg+8ckiqBwSWRWXnDZJrjuw6y /CifsA937Pfhovk9h7KnF+cmSYXvApsZAcUu8ElJpwHkGJ8qGhEdaKbUiCruBe8x/f7DaCDfFNC0/ UBjS6YLU9MkzBeskiVphJ5T8HaYIQkOJrRxN2tmm7uSoXp1K10vd4QEQ8dLD678Ug8TQvTqfJee7Z luRGtcr5GgMgQstslb1PP1wrogrnsYJ4qr9Uuw/AycZIg/PMcJyq1Yj4lMtgsjaDi75R5p59YpSy4 A5e53ZRQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj0PN-000xrs-Vp; Tue, 18 May 2021 14:09:18 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0PI-000xrI-U3 for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 14:09:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=hPu71etaeMMZvzTPFtzSI9BI8nJoEGSVYB9byxQfvWE=; b=qP+VTKNKpXRb9CzxygymD7hHkB CzqlhS0hxwbXenMIjaXjykFp8P0JwBtEwqACy+H9E3k0S++mQyYyfYSa54iQYjzeKIKMmWFozU+Xw 9rHCgva55olxNFz0FhIgq2QCYcuTH4FPAFAxguAJRifbyRnk3BbzbVDiWSFK1e3yZnFlggzff+HGm 3l6yPzyI35V+JU3Lx1rp87RhMFsY69kWsOfwQidb4pUnjVX6Agy179DsVGHNRdWxSKUq9Kf1hlQgU SkoXGxvMjK3AdZO2pDZaIHCRnkZBFU1HfGHPl4MzDuK81D5IzQjJ4g4fh2F3psTZshIpzFhBRAroV Bm40tr1g==; Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0PG-00EiIL-0d for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 14:09:11 +0000 Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FkySv3cY5zQpxk; Tue, 18 May 2021 22:05:35 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 18 May 2021 22:09:04 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 18 May 2021 22:09:04 +0800 From: Yang Yingliang To: , , CC: , Subject: [PATCH -next] dmaengine: stedma40: add missing iounmap() on error in d40_probe() Date: Tue, 18 May 2021 22:11:08 +0800 Message-ID: <20210518141108.1324127-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_070910_242576_CD4236F4 X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the missing iounmap() before return from d40_probe() in the error handling case. Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Linus Walleij --- drivers/dma/ste_dma40.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 265d7c07b348..e1827393143f 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3675,6 +3675,9 @@ static int __init d40_probe(struct platform_device *pdev) kfree(base->lcla_pool.base_unaligned); + if (base->lcpa_base) + iounmap(base->lcpa_base); + if (base->phy_lcpa) release_mem_region(base->phy_lcpa, base->lcpa_size);