Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4416126pxb; Mon, 21 Feb 2022 20:55:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxNQR4UVSj5KjXNh6sO2t3aECSJS6eFnTEX9PwtC9R+lC2JzvQ+MX2Tx9SUv3lFGXTH7bR X-Received: by 2002:a17:902:c60b:b0:14f:e42e:520b with SMTP id r11-20020a170902c60b00b0014fe42e520bmr471805plr.7.1645505745805; Mon, 21 Feb 2022 20:55:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645505745; cv=none; d=google.com; s=arc-20160816; b=rnVBAfNBIOU0h1eD9f1bEVCrC/sgpHyJ3mISWLGOEm0ZLG5+MrwxgYJEW0Un8/oxN8 9k4Un4wTkog6hqIjlJw/iXgoApMfbbAWd24Zpj0EkqAN6Lu9UX7kyCMsdafgqc4geLQr UHKOOBW1nP8oYro39NAYAoj+8ESSs4MQsizUqdZILBskXmz3pdQVgpsK7VFUzEiZJP7G 3gzmyMpil1VFvPcAgmbuUQcKvmCSEjmauvLA8RecYvMWly/pZVXZ7VsWj1rt3e/WN3SF mS5AK8wKEXimrkzmxsxEc1CkwYI5BTf2T6GpDmTLJYy9gvHMdgH36BogceSjOwVBHajW lmXA== 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=9HL3CKvJmchwnh8C6W6uHLsXquJxFfXIhhAwuKFq5g4=; b=r+xiDoMe3EWEaZXt1qkv1L6le7Y1dneF6Jn3QPWLEQl1yT18AVGT+mJ2UeIGgwTwBH 9HO8OyrMtOSjfhX92HJ8yHIKYFAcZI/EH9e5J+c5/F8oj8uaRcWTYQEPOzMIRbcCJcSx IZocoHewtbwFaRhoo/AgrqDuy9cukTE6EuILaRxFzaGuQ/WUsTyMNbzB2lD2+LdsDqIv gN5CE9ZtTtuUUNr5wVDu943NqRnBbmfzAWEYBB43nMEC1zhLz4kBRfH0bE49wPHc9jzy 7d/7qU74l8GL6N25rIFBXpgN9IRnRAjK6fh9NPKcBITvubr+6Bk70QzQDHzSSGthISxw cmPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oQZ34j3u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t2si1141664pjl.126.2022.02.21.20.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:55:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oQZ34j3u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF4F41B7AE; Mon, 21 Feb 2022 20:33:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353001AbiBUJ5B (ORCPT + 99 others); Mon, 21 Feb 2022 04:57:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352857AbiBUJr7 (ORCPT ); Mon, 21 Feb 2022 04:47:59 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D8F1340D7; Mon, 21 Feb 2022 01:20:36 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id AA91C60B1E; Mon, 21 Feb 2022 09:20:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D57AC340E9; Mon, 21 Feb 2022 09:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435235; bh=m/Ls7iwkaqS2dcjZEfcb++pBLhNY7snWG90lKX+d0X4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQZ34j3um5JdoSw4HPOfvE7TRV9z8JDNaMsr229U8SpEkyyZ5PLbxyxhrknD7kJhZ p9DUyhog3MZrxQUFWc/M8k0YSEBXe2IbTK3OyfJCat54DZrfEJo2Mzohqaa7Ytsnxn C4UHTBFVtCvJrIPZb18ySYsXXY1dzdlDBk18m54w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Luca Coelho , Kalle Valo Subject: [PATCH 5.16 093/227] iwlwifi: pcie: gen2: fix locking when "HW not ready" Date: Mon, 21 Feb 2022 09:48:32 +0100 Message-Id: <20220221084937.972251146@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Johannes Berg commit 4c29c1e27a1e178a219b3877d055e6dd643bdfda upstream. If we run into this error path, we shouldn't unlock the mutex since it's not locked since. Fix this in the gen2 code as well. Fixes: eda50cde58de ("iwlwifi: pcie: add context information support") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20220128142706.b8b0dfce16ef.Ie20f0f7b23e5911350a2766524300d2915e7b677@changeid Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c @@ -384,8 +384,7 @@ int iwl_trans_pcie_gen2_start_fw(struct /* This may fail if AMT took ownership of the device */ if (iwl_pcie_prepare_card_hw(trans)) { IWL_WARN(trans, "Exit HW not ready\n"); - ret = -EIO; - goto out; + return -EIO; } iwl_enable_rfkill_int(trans);