Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4340776pxb; Mon, 21 Feb 2022 18:29:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwj8hp7JuIyBgV8JBDklocw1BGy1sbMEQgmpEtyxvaVKPsyr8wY+f2kev3tlU42/Q07NqcH X-Received: by 2002:a17:906:954b:b0:6ce:a859:71f8 with SMTP id g11-20020a170906954b00b006cea85971f8mr17510312ejy.380.1645496946859; Mon, 21 Feb 2022 18:29:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645496946; cv=none; d=google.com; s=arc-20160816; b=Ujk2vzpDea1hBreVEy7x/3xpMkZu3rHMV727z8VBNvm4ppHVEve9vnUpQJPu97D66T 6/CWYLJeUD2T+3ZVzINdPFWDTQ+AbMKR1HSAIl1pf9M+fbS2/7W8dr0yj4FEXNXvsiL6 TZT4AhXmhypysK54Ypmj2EY/DRLxdpVDt/WwNqepbPXpw1nujGFbe4jMY188jVjN5Jr5 byDU2D1S7wbBY2SGEGizgXeVIuxKhuHDqfwlOGOfC4OFpGehXXJUGFiiZ7f4L2MgSKXF eTjlTSBoAVX7F0WNrxCd8hcOV9IquD2L5ho8ChildP+pyzfJWL7kxxI/64sHlLXsHVsC K8jA== 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=UVbmu0UgerHdethVl7FtEtR7bfFoP5On2cDJJlADEUo=; b=CkhYbVy5ojXlkO2MvY2S8CQHjjaVDi+pz//WITVGLlIRCawPlxgkJf4+3CMrRAw3Cc 1RA73zIh+0vHNLHt7hDFcLY0PCDb4qmdsykfnkSQSjfd+iVQfFw8anDJVe728NhaEkK2 bQh2vvLx6isS3s9brpeEgnuQzhA+2xJMQdhRLrE1V360irDAEZWuaYdImQ0r1FnZ75iD s6VM9IPIvDpQavlv+kpY6vYLS1hjooFusrDbgZ19ACZXA7ZA+9M5V4FUE0Bs2mC04OnP k9EshDdEWNcDjUIOysIC++IhApV4tJUXKoSp8nrt+xsqr4khiBSGMWKyC8s5U6XVsuYD /Sow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DCxDrpsc; 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 e18si8369309edv.229.2022.02.21.18.28.44; Mon, 21 Feb 2022 18:29:06 -0800 (PST) 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=DCxDrpsc; 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 S1347962AbiBUJKU (ORCPT + 99 others); Mon, 21 Feb 2022 04:10:20 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347122AbiBUJFd (ORCPT ); Mon, 21 Feb 2022 04:05:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8236025C6A; Mon, 21 Feb 2022 00:59:00 -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 ams.source.kernel.org (Postfix) with ESMTPS id E4DC7B80E9F; Mon, 21 Feb 2022 08:58:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C183C340EB; Mon, 21 Feb 2022 08:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645433938; bh=IKejKO+HG0ZojKwOD7cpTId0G+Pg1AbEmtAWgyaF870=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DCxDrpscfwhDtQmJyxnPd8sR0DELCr3u+5PROIkGSdM1aUCuimmjhKv6Yj5u3oAKv A1aL/8QKxhwwJnbfMFdtKi4EbVcOqLK+6mN2lgKlvlRvIgUDk4fO6R+ytPxL0zXe8s Zu8wczGg15qCcaWjTscBKnZZkvXRfNjhl4yGcrOk= 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.4 36/80] iwlwifi: pcie: fix locking when "HW not ready" Date: Mon, 21 Feb 2022 09:49:16 +0100 Message-Id: <20220221084916.752938224@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084915.554151737@linuxfoundation.org> References: <20220221084915.554151737@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=unavailable 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 e9848aed147708a06193b40d78493b0ef6abccf2 upstream. If we run into this error path, we shouldn't unlock the mutex since it's not locked since. Fix this. Fixes: a6bd005fe92d ("iwlwifi: pcie: fix RF-Kill vs. firmware load race") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20220128142706.5d16821d1433.Id259699ddf9806459856d6aefbdbe54477aecffd@changeid Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -1335,8 +1335,7 @@ static int iwl_trans_pcie_start_fw(struc /* 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);