Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp385771rwe; Wed, 24 Aug 2022 02:44:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bZEWlZKhaMMbpyoQ7E2RmezgN3+ZCuscvQS/sQfibpVW6ULaNd2grRb2/+DLjxYY9g34G X-Received: by 2002:a05:6a00:24c2:b0:52e:7181:a8a0 with SMTP id d2-20020a056a0024c200b0052e7181a8a0mr28950612pfv.57.1661334259991; Wed, 24 Aug 2022 02:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661334259; cv=none; d=google.com; s=arc-20160816; b=TlmnudFxapUKIrnYUPCIiV9wALAGI6KIm3TVBTH3/9RuLbplYvio6vHVNdXOUF4HC5 IIauUoBYAggctU+/xFcdZk5q95VPZyEPckW9TZcxn712gJxWYWwOUbLp7xHnISuL97MW SsphfxXi/HpcEvOO9c39dt4vdhThgKQpBR0auMBgosrvOTZLFkJoYm98adbthQWFKhqo /gbAsFdRpuUeZQd8J/FwDXwc7mNFKvALYx6rh1LquXKDcTBak1F5G4LL4FGYFApm1wWO atbW83W+iDOlX9DOqJeIlZcF8ovA19AEbr/uyRAaKL4VP8F8zHxbD/HEehCU67l6lRIj DOzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jgDeYLrp80GKZ8aqUkaXWOkan81kCNhfOlHwp/h9NUY=; b=FRjXKh87XHB087q21jUsVNXOMZ2NoVODHsiFQuGcdSyLaAa/r7lbKWe3DcUO4/wUdr y4VyPu5Souv3dqM29MqZiE2EHSQKNuMEzVh3BevaLF28TddzLepJlbmWNuHPYD5bxIkR FzmKYQ3IXPry8ZJOFvoAuXcwvDFDw+xtDYp/waYhztLU1XxNlcL1Gevf0NbpadXeIulQ RpsgK+M1C4Mm5le++4/z+Bw/AZt2FFa8PEWbPLzkUQHhqWPsyd6x+1caq0exSrC3jFTT T5oqvteGf1LHDS+PgPgNKduqhteUZd4poYhD+8uBIl/j3JQfBZpTFhFw6u2wVzK+nDrJ j97A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nv16-20020a17090b1b5000b001f31c65900dsi937122pjb.150.2022.08.24.02.44.08; Wed, 24 Aug 2022 02:44:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbiHXJ3Z (ORCPT + 99 others); Wed, 24 Aug 2022 05:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233776AbiHXJ3X (ORCPT ); Wed, 24 Aug 2022 05:29:23 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFAB844CA; Wed, 24 Aug 2022 02:29:22 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MCLLk3lYZzQwNg; Wed, 24 Aug 2022 17:26:06 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 24 Aug 2022 17:29:20 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 24 Aug 2022 17:29:20 +0800 From: Yang Yingliang To: , CC: , Subject: [PATCH -next] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Date: Wed, 24 Aug 2022 17:36:57 +0800 Message-ID: <20220824093657.3365027-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add missing iounmap() before return from ccio_probe(), if ccio_init_resources() fails. Fixes: d46c742f827f ("parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources()") Signed-off-by: Yang Yingliang --- drivers/parisc/ccio-dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index f223afe47d10..a66386043aa6 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1546,6 +1546,7 @@ static int __init ccio_probe(struct parisc_device *dev) } ccio_ioc_init(ioc); if (ccio_init_resources(ioc)) { + iounmap(ioc->ioc_regs); kfree(ioc); return -ENOMEM; } -- 2.25.1