Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4230879ybb; Tue, 7 Apr 2020 03:27:22 -0700 (PDT) X-Google-Smtp-Source: APiQypJ4Fb6DJE4kLZpF0mc+GPQiwi4hcpI/Ncclj0P539IO/CDNAbOfoKZVbwY5Gf5hw79m4CEt X-Received: by 2002:a4a:3ed7:: with SMTP id t206mr1253614oot.61.1586255242055; Tue, 07 Apr 2020 03:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586255242; cv=none; d=google.com; s=arc-20160816; b=p+YryiQ+c3uAGMm58JCyZvTCgxoezKZ9xWF3N9VD8M9GrTLqTH4ifeSazqi7krCWZV 207YAWT2jRqGgxcqiq9MG6o/Vzp/u8nl2kdkppY2O4VG/d3rXrykeGplEBuTBM3hitR4 /PcAWjhrZFkWsx/7qbf48ry6+wfeCEMVCWk6q5gUnqTgmB1FaLjIrmp5ZjLDrEyMxpky HzUrL8gjD1VvQxpXctdbyJcK0zGKGA+ez8Eu+6soXGr+xUxJxV5kFOn10mdSNZGW8p5e YaJQdH/9q6dSDpSMVgPKzTHJx5rHNj1G0eO36ilMBfBN5/EjvSh2rIuooJA2donbIjgu rssg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IdVz2N/QpE1cyTi/XuDjTL9g2l+TWClUdugsPDTd3cE=; b=wlwZilUQa62jAGmUaeXL1JUPL/J1SeTjt9kRo4Vr7J8eeaKDzKuHxlcmse0qbqZIW7 ajyygwDaIySYBLws+sGX3eDcN1sOyRW4pL3oT/CHeLvP5uRBYpvrtLnlJBj/JYkM9Ncd Kk+qva6mvdpZKSspHqkWyZK+NOZy8TD0kc3U8ZaOiCUrMTRKuEBHTJHOhtsXkXMwmSqa A+VM12U/wP/PA7Hcux8Hbr73wpi9nwlN0049h8EVNzCmqUJrTRx3ijq4FDQXngDUdqWX 9RMr14DdO6Q43Y1J9ExVftbuErsiiYm7dgOe6wg4qFgZWTpCt5iULk/OhP3ny9UQrNGj xK9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IVdc99Vg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si472973oig.220.2020.04.07.03.27.10; Tue, 07 Apr 2020 03:27:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IVdc99Vg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbgDGKZK (ORCPT + 99 others); Tue, 7 Apr 2020 06:25:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:35592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728880AbgDGKZI (ORCPT ); Tue, 7 Apr 2020 06:25:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 010182074B; Tue, 7 Apr 2020 10:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586255107; bh=sKbjwMLJiBOphC69hyUcwuxnGfiE7NbpZaWocYhiKBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IVdc99VgMFf76EWBozzgWB856yo84dwI3/Nf9OLFVAOaj9uXZeF3bxu5YViMECGD+ 7/m2oY+W+EXrpmhjBWszAbw85PpZ0PNN+SXd0RXVIsGrGmEHRCSuBjLR5IGRWmzrPa GffIvQeXbmdfl7jvQZOGu/PhKY+IZVp2ZPwnfCrs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= , Sasha Levin Subject: [PATCH 5.5 08/46] staging: wfx: fix warning about freeing in-use mutex during device unregister Date: Tue, 7 Apr 2020 12:21:39 +0200 Message-Id: <20200407101500.370794039@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200407101459.502593074@linuxfoundation.org> References: <20200407101459.502593074@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jérôme Pouiller [ Upstream commit bab0a0b03442a62fe3abefcb2169e0b9ff95990c ] After hif_shutdown(), communication with the chip is no more possible. It the only request that never reply. Therefore, hif_cmd.lock is never unlocked. hif_shutdown() unlock itself hif_cmd.lock to avoid a potential warning during disposal of device. hif_cmd.key_renew_lock should also been unlocked for the same reason. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200310101356.182818-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/wfx/hif_tx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index cb7cddcb98159..16e7d190430f3 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -141,6 +141,7 @@ int hif_shutdown(struct wfx_dev *wdev) else control_reg_write(wdev, 0); mutex_unlock(&wdev->hif_cmd.lock); + mutex_unlock(&wdev->hif_cmd.key_renew_lock); kfree(hif); return ret; } -- 2.20.1