Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp274694pxj; Tue, 18 May 2021 03:08:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFUcZtxG8JK1zi2D1mzeKMoueLk2uNuxwGm3MFPMi2z1st7xPb2r8lc+JoToLiQZqFiYL1 X-Received: by 2002:a92:b12:: with SMTP id b18mr3727897ilf.100.1621332496293; Tue, 18 May 2021 03:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621332496; cv=none; d=google.com; s=arc-20160816; b=JRzhdoBLvpRXn7QgzSuQW8PByiq0922hZnwqOg7bsZhcqMmyIK7IIxvbG3KRVPCOaV lIoyr5DL3EFP0Bdah1qX15p0XnXnkMXxtpLpF8E5uUn4c1qKtWxzSXcWcEw2XYUPazkp UxoN+YefzkPEFgbY6RMGN4fl2C67S7xQppNoJQliLZdT2OaYrNndGqKfoilwGyV30ZYU XuGNw2uLjMm7WSmwZQ/4D18nWD/+vVrrxv11B856Gq0eXv507AZJkQuhOoORAXXWW06o DJ6Q03V/z6RKWvjIzTNsV9GPPSDY3ugzrjwQur0X9i0IOxHB0dFHq/HIRNKZlJ+sqL3i O0cA== 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=JDfaJAWc8DO9DPySSeCH9MbY4iclgBDjAtfxcONEBJw=; b=Zb9GfW8qb3cfSo0quxJi5eHXtiHxynvvgMBTMKizYi4mfbYyd1OO0FWT9qX8WWaeor O1b17eSpoAwoiG9dR9LmC/X1zijzWutsXxXXog81Nnzb6yronkZQ1UgcSEfZSH5i2Zww piE3ExelgAYDlSrIi1rSJWrBZYRs6M9i1WfYKqwGRDVZyYPzAWsDUa2syNg0oJ448/4v 1gavhzQk2a1rYBKv/YZIoDBsJN1ffEvX7Z22PS2VsmbDC5ToTPx+JoTl1K0ARVldIZ4J AglwCmPiO6fE9mTDVJiPMvulol4lBWiCw7wQgfzZ7CDJjVdLBbBWOuE/B6rcA0X09rlz QEGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2U2zZ2c+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si21666552jag.124.2021.05.18.03.08.03; Tue, 18 May 2021 03:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2U2zZ2c+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240230AbhEQPLR (ORCPT + 99 others); Mon, 17 May 2021 11:11:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:58816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242207AbhEQPB5 (ORCPT ); Mon, 17 May 2021 11:01:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E333E61396; Mon, 17 May 2021 14:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261647; bh=/jP+cfFo5JlRNySFiT1j/3TcdknOoe2DYmu7MWOTPlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2U2zZ2c+avk7PTDRtcIBErroZ54gDxwBpf1f1T29R8duRblP3t2tTd4K9GhJNyfxN xe7yP69x9g0C/ohG2CfgTiJeZYH+NxJ7mNsPG4InbUjPWncaXyZXzMEiPuTkpBxAyE Go6EzaLDLcJhU1klxGeAWRS1/gyBJGUF9573R724= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Tong Zhang , Sasha Levin Subject: [PATCH 5.10 025/289] ALSA: rme9652: dont disable if not enabled Date: Mon, 17 May 2021 15:59:10 +0200 Message-Id: <20210517140306.027706740@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tong Zhang [ Upstream commit f57a741874bb6995089020e97a1dcdf9b165dcbe ] rme9652 wants to disable a not enabled pci device, which makes kernel throw a warning. Make sure the device is enabled before calling disable. [ 1.751595] snd_rme9652 0000:00:03.0: disabling already-disabled device [ 1.751605] WARNING: CPU: 0 PID: 174 at drivers/pci/pci.c:2146 pci_disable_device+0x91/0xb0 [ 1.759968] Call Trace: [ 1.760145] snd_rme9652_card_free+0x76/0xa0 [snd_rme9652] [ 1.760434] release_card_device+0x4b/0x80 [snd] [ 1.760679] device_release+0x3b/0xa0 [ 1.760874] kobject_put+0x94/0x1b0 [ 1.761059] put_device+0x13/0x20 [ 1.761235] snd_card_free+0x61/0x90 [snd] [ 1.761454] snd_rme9652_probe+0x3be/0x700 [snd_rme9652] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210321153840.378226-4-ztong0001@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/rme9652/rme9652.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 7ab10028d9fa..8def24673f35 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c @@ -1740,7 +1740,8 @@ static int snd_rme9652_free(struct snd_rme9652 *rme9652) if (rme9652->port) pci_release_regions(rme9652->pci); - pci_disable_device(rme9652->pci); + if (pci_is_enabled(rme9652->pci)) + pci_disable_device(rme9652->pci); return 0; } -- 2.30.2 required: + - resets + + - if: + properties: + compatible: + contains: + enum: + - renesas,vin-r8a7778 + - renesas,vin-r8a7779 + - renesas,rcar-gen2-vin + then: + required: + - port + else: + required: + - renesas,id + - ports additionalProperties: false