Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp670793pxb; Tue, 5 Apr 2022 18:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBOPKDzTqV4UiL4GuYs0n6OQibpEw16Q+yoWkvY2YVhvUNc+unnZmFZvzj+uo1jBKGHcHe X-Received: by 2002:a05:6402:1708:b0:41c:b3e2:c4e7 with SMTP id y8-20020a056402170800b0041cb3e2c4e7mr6384540edu.197.1649207184880; Tue, 05 Apr 2022 18:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207184; cv=none; d=google.com; s=arc-20160816; b=stg2fg3GMG8T6FJ2F9aij0XzMbcqphY5ArZaRKhbAb3QmEI7IaDf9ue0hu3oNEGgZX gYccheb+ha4GDQGUyYHnw+DAxJ5bWN9G3sP4rzeTsWKmUxUEbXglxhlfd+q/9p+YHNlS RuiSOCDh30r2/jM5jxkG8VU4mG6Vbj6BdxRdo13ihILEIAleMVpEXRXVpQoPb3WYNK9Y PdbuDKgZZ5mhl9dGINQ2f8tN98ditWepHGSN0kZGXDL8BqRuaMWajg451yNuYH/zPIrL uxdQyRwIuaxF3/xZyUi1YbDABmH2pHkjX3PAxpMe7Cclk57/rVKwkgNlSSVtNUv4gJEu ZBSA== 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=raegMqGp/Fw93DAl0FH2Qhfqjo+zTzWGs95bCBQdRwk=; b=UOZh/HvAFVVkv8mqNRBoFdcPni3KbAEpQx3GIpEGg7rY2MaVVB5Cc6ZZ0KLG9YPjlj BEp5ee7X/Dep2lSIbOg45sLQlD21h6qF7LXO3/cRrYrf4iUAgTTGf9BJ/D5mKZh/fC91 85P1AVEATZje4jIxMUOOiaXmixkCaCkoIW64bfN2fHQiLl2cBCq4HSygnyXwo85xADYq BDVdZMO1QtqyHne5L9uv0QcPYWFrdqVsFJ8U/kNbWaebd0tcBNSrZneYFtMI+Eteqh05 VP5RFoM7bReMPg+LBfYYMhECyHROtY6euVA7v7be0ErWs8V/4aI2BJl2uRx6skSmljLv HWwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kwa0v2Om; 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 z16-20020a056402275000b0041080b4c683si11535377edd.0.2022.04.05.18.06.00; Tue, 05 Apr 2022 18:06:24 -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=kwa0v2Om; 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 S234060AbiDEJjr (ORCPT + 99 others); Tue, 5 Apr 2022 05:39:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239335AbiDEIT7 (ORCPT ); Tue, 5 Apr 2022 04:19:59 -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 296B389084; Tue, 5 Apr 2022 01:11:23 -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 B4796B81A37; Tue, 5 Apr 2022 08:11:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 216BBC385A1; Tue, 5 Apr 2022 08:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146280; bh=xtIMnYy/oN7Xfj9rTXRq6O2uWaiAM06WmjSw/S5HbOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kwa0v2Om4/2ORM1w/+BxohUUvqDGgCncB2g0aciE30Al96THHhByNvIPPDb1dTM9S z7GwElNLFUkqGgRJofKzPHbXE6slkeL8Fda5G7L6QEWW9lPDa0M62im5reKieF2A9a UzLCHazQ9+qy2RjFliEcxC6rrYAS6nN2T42geCCI= 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 5.17 0706/1126] mfd: asic3: Add missing iounmap() on error asic3_mfd_probe Date: Tue, 5 Apr 2022 09:24:13 +0200 Message-Id: <20220405070428.325966074@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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.1 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 8d58c8df46cf..56338f9dbd0b 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -906,14 +906,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; @@ -927,8 +927,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