From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACE89ECAAD5 for ; Tue, 6 Sep 2022 14:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241989AbiIFOkt (ORCPT ); Tue, 6 Sep 2022 10:40:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242142AbiIFOjn (ORCPT ); Tue, 6 Sep 2022 10:39:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 749EC9BB6A; Tue, 6 Sep 2022 07:01:36 -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 95E7FB818D1; Tue, 6 Sep 2022 13:38:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2A58C433D6; Tue, 6 Sep 2022 13:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471488; bh=iZyDhdzEp9CNBVHVu2q4QPkSg91EeUUS5JjAq/g64AA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ve8bpf9e1720PCMRCNLtPRQRBOM7UVEVtXth2Ww/9mYP3EfiyHdjJnWDKEJs7yjBC Ulibrg46UBpUJVIk7ddeZujkAh7ED61IPHCXJL1M/BfEpJr/6XQAvPQaxB5Y/nYYYi qx7gU8X5YLV4LJcNvXAuTibHPWX+nSJkg0kA+auc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Seunghui Lee , Ulf Hansson Subject: [PATCH 5.15 044/107] mmc: core: Fix UHS-I SD 1.8V workaround branch Date: Tue, 6 Sep 2022 15:30:25 +0200 Message-Id: <20220906132823.686079933@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132821.713989422@linuxfoundation.org> References: <20220906132821.713989422@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Adrian Hunter commit 15c56208c79c340686869c31595c209d1431c5e8 upstream. When introduced, upon success, the 1.8V fixup workaround in mmc_sd_init_card() would branch to practically the end of the function, to a label named "done". Unfortunately, perhaps due to the label name, over time new code has been added that really should have come after "done" not before it. Let's fix the problem by moving the label to the correct place and rename it "cont". Fixes: 045d705dc1fb ("mmc: core: Enable the MMC host software queue for the SD card") Signed-off-by: Adrian Hunter Reviewed-by: Seunghui Lee Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220815073321.63382-2-adrian.hunter@intel.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1491,7 +1491,7 @@ retry: mmc_remove_card(card); goto retry; } - goto done; + goto cont; } } @@ -1527,7 +1527,7 @@ retry: mmc_set_bus_width(host, MMC_BUS_WIDTH_4); } } - +cont: if (!oldcard) { /* Read/parse the extension registers. */ err = sd_read_ext_regs(card); @@ -1559,7 +1559,7 @@ retry: err = -EINVAL; goto free_card; } -done: + host->card = card; return 0;