Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2809102pxb; Mon, 18 Apr 2022 08:40:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHtJr8pBrPZrN8/zJitQWYed1XgLdTQuNKWsGCbpO2MFnQr59W8jf7C0Dmk24cWFMIy+SH X-Received: by 2002:a05:6a00:22c1:b0:50a:5c41:c6c1 with SMTP id f1-20020a056a0022c100b0050a5c41c6c1mr10156245pfj.74.1650296456437; Mon, 18 Apr 2022 08:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650296456; cv=none; d=google.com; s=arc-20160816; b=CS9q4jOh7NmXvqGvhjgxY1fs4fkD/1NFO/LEidn6tbrpcEMSSZSiCM8xN/QdJj43Ar dxO5Nskb1PQJqdVF+k1xGvuObyH26fKeX3KxD3DDU0Uzl8pjDqNXK+27JKnAuX5o+fM7 UQwvAaV62ZeEcedLO99utNqvEI6UgiuI+KlTSQRq4JOIlTWOCJKZJY2Kvc5T3nipU0k0 W9a1FIvFT7hTfUx7aL+o5oYhHVzieeMjKyXQb7wJMfQSGd3Il3N2fd7KAMeSlDdUsUdq Wn6vGabtBBVAxzDVTjju5J7VQxZN+zyBWpKaJ1AmyEcIAXN5S9vogJPr1XKG4yzxtg20 6unQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=COzE74BnNZyU0bAbkjepvfztkriiG6BluCTV24AiUUk=; b=uIrngDSZFg8ohEV/AblsobmU4Dim2P4pHOst+TS/ukMZdJgBNzO5REcQqEOdmPW0Pq Ylf0ZU/ULmBE/zvSD8ymn198i271XG0W/xaGhPfuiq7iv1ZObg8GVzckhEfq/ENXwHeU Cgc524w6je8jlR+hMabf0zEXdTErB6TiJ9P44sUeHiCh+JsMrPua4fjz5IRdWHDnvNsF GC0vpVxn8zd0ogCxfEOXGOmKaFuIMRrZ71d3c8P9FqGOB6hBK7dmN0LjymaARPfpmUbl 1ccLeepak/GEzr+xvenXz9hT5zMp38G0+UxLCWmMyrGVkytATeEHFsOzufvdVvLPV/Xu wTwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vrrVhSRE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a170902f54300b00158f80642a8si3040642plf.198.2022.04.18.08.40.40; Mon, 18 Apr 2022 08:40:56 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vrrVhSRE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244092AbiDRNvR (ORCPT + 99 others); Mon, 18 Apr 2022 09:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244827AbiDRNa4 (ORCPT ); Mon, 18 Apr 2022 09:30:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E92823178; Mon, 18 Apr 2022 05:55:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2B5FAB80E59; Mon, 18 Apr 2022 12:55:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E0BEC385A7; Mon, 18 Apr 2022 12:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286534; bh=9ZccqI90b3qVX+4AoLo9RewB1wZ3Yplw1h5YSy2D9L0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vrrVhSREw/t7N+lrT6hjaSluzkxYO7AlArU4Kf9+vffpGo7yWFtX+3E4GCZKXrSvh o5o6Jb6eI/ZDstsnDL/lCRxVkwdp/F5rutl3B09f4N52EVSxlVa2KKIyeDqL65YMmG DYB7IDf/0a3VHVWZD8ogu9Ad3/JZOxv62wkOLdAc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Lee Jones , Sasha Levin Subject: [PATCH 4.14 128/284] mfd: asic3: Add missing iounmap() on error asic3_mfd_probe Date: Mon, 18 Apr 2022 14:11:49 +0200 Message-Id: <20220418121214.893176962@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Miaoqian Lin [ Upstream commit e84ee1a75f944a0fe3c277aaa10c426603d2b0bc ] Add the missing iounmap() before return from asic3_mfd_probe in the error handling case. Fixes: 64e8867ba809 ("mfd: tmio_mmc hardware abstraction for CNF area") Signed-off-by: Miaoqian Lin Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220307072947.5369-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/mfd/asic3.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index cf2e25ab2940..21424c43ba72 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -915,14 +915,14 @@ static int __init asic3_mfd_probe(struct platform_device *pdev, ret = mfd_add_devices(&pdev->dev, pdev->id, &asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL); if (ret < 0) - goto out; + goto out_unmap; } if (mem_sdio && (irq >= 0)) { ret = mfd_add_devices(&pdev->dev, pdev->id, &asic3_cell_mmc, 1, mem_sdio, irq, NULL); if (ret < 0) - goto out; + goto out_unmap; } ret = 0; @@ -936,8 +936,12 @@ static int __init asic3_mfd_probe(struct platform_device *pdev, ret = mfd_add_devices(&pdev->dev, 0, asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL); } + return ret; - out: +out_unmap: + if (asic->tmio_cnf) + iounmap(asic->tmio_cnf); +out: return ret; } -- 2.34.1