Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3469836rwa; Tue, 23 Aug 2022 05:24:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR6tQBEozadlVU5L6rF7EvjHaVdAdB/cInmfD02wPW1boTPy2zNph8UwgVakV7CpAX7iY6A4 X-Received: by 2002:a17:90a:7086:b0:1fa:f82c:ce7b with SMTP id g6-20020a17090a708600b001faf82cce7bmr3135662pjk.38.1661257467778; Tue, 23 Aug 2022 05:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257467; cv=none; d=google.com; s=arc-20160816; b=GacvDkNjSBpXg/kTeXsMMkimi7xGp1AzcxULjQ8EWWWPUox9Y1dMHpC+KBlTpu2A4N nfcZgli/fgVRu3mV7qaaV7sXSvy32wZJpBMwdDmKtRrTiwcFSGVlYePlOgIYjWH1Yj7H 2xoXCRBucl/mGOeJPKNv13DIZfLSecPcSH6JK7wPKVe1IBQgffUzdjhdNxYYp8oDpRCj 8nyJ84p2PoLPTmN7hLLBFAsF0Cgtx4jMUfFEAWxeBEuqyHJipHE83iP5y4RsEi3YZGq3 CQWjwgZLDWhlqAEjczHXXOYJhU9sJiG2x+cWNPFx/8f4pLYAJ5Of/a5Hm8t9obNcYxqP GavA== 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=chcXaDcS7zHXYYobCvp6KEm7SKASGjIyYNLFaagHiRo=; b=cpFzj42uD7qoCrUkJbwgTZsP6kFwKWLZ1V/JJTsabOYpTtIGaujb2eiCaelg6QCPYY V9NFpg0fv+jZv4GZ+Ise06Z5Q9rIFBGZVXhXywVjTJJ1CBRQVY6GlPSIAs4eKcMUjenc itRNbuxtpJheo88gC+X1YIyv/GHzBAcam1ZNvPWKGFIJUuuLj9vRErvmZPJivLzfPkXl QPSD6yIQKnf9H5pfpSGNfumFPYA/jVf69qnXyAR8/+8Mxj014Pdm7A4z7K+8WjWcwrKU w/PsusLSXpmjpu42VmnX1jco6kSXaGafqASwiLLruGV2QkE1EWmEKG0ACDQqGfq+Awdu NhSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hOJbQh2b; 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 t16-20020a17090aba9000b001fafc10a6ccsi10713608pjr.187.2022.08.23.05.24.17; Tue, 23 Aug 2022 05:24:27 -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=hOJbQh2b; 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 S1356119AbiHWKxg (ORCPT + 99 others); Tue, 23 Aug 2022 06:53:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355885AbiHWKp2 (ORCPT ); Tue, 23 Aug 2022 06:45:28 -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 BC6696CD3D; Tue, 23 Aug 2022 02:11:20 -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 3A6E7B81C35; Tue, 23 Aug 2022 09:11:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6699BC433C1; Tue, 23 Aug 2022 09:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245877; bh=h1jkUpnziud4k0faG/n89NzZ4EPIruthGTUed7lsyA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hOJbQh2bfjCNhnNXg/aBp8M6I63wdLAEJwXzLp1/CByHc/CYsNSuC0CldJwBgMTRw PM1P0KAz8TKFtCxuVCLJYh/f/zjN8tJrebSCrGIW+Biusms/rDP8suJXn3IZ3/uNTD ixtkv5lxH5T8LQ6/YiryAwXtue/WNdxzRg4vtyNs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Ulf Hansson Subject: [PATCH 4.19 219/287] mmc: pxamci: Fix an error handling path in pxamci_probe() Date: Tue, 23 Aug 2022 10:26:28 +0200 Message-Id: <20220823080108.337613461@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@linuxfoundation.org> User-Agent: quilt/0.67 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: Christophe JAILLET commit 98d7c5e5792b8ce3e1352196dac7f404bb1b46ec upstream. The commit in Fixes: has moved some code around without updating gotos to the error handling path. Update it now and release some resources if pxamci_of_init() fails. Fixes: fa3a5115469c ("mmc: pxamci: call mmc_of_parse()") Signed-off-by: Christophe JAILLET Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/6d75855ad4e2470e9ed99e0df21bc30f0c925a29.1658862932.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/pxamci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -653,7 +653,7 @@ static int pxamci_probe(struct platform_ ret = pxamci_of_init(pdev, mmc); if (ret) - return ret; + goto out; host = mmc_priv(mmc); host->mmc = mmc;