Received: from linuxtv.org (140-211-166-241-openstack.osuosl.org [140.211.166.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 783E56F2E0 for ; Mon, 10 Jun 2024 08:23:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718007799; cv=none; b=iH+05U3WmMECbdC6uoEa23W/3d5ze05gZXTkTfCw+VvC1ULSZmCCK8rZfE67rxb/3oHtdBKURyCmgYk96be0OS4Aou3TBW5ZMdSIcyJSkgOsH9jzUZ9o/rKyxLRwxJNB58NptbjRu3odYqS3rhGIWsqI/Yqr+mvcHSdsjayOKxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718007799; c=relaxed/simple; bh=mjfcBUsHR0ot/pUSc8l/UI/WDg0murBb+WIqBHhFaT8=; h=From:Date:Subject:MIME-Version:Content-Type:To:Cc:Message-Id; b=RgxHuR/9lDTu8pTgd00QKayvDrym3HL9LT07AN8XR9GttSQQ8RLEDU4B89Eb30nzyvX0rpvZOCk4lrn8EDRiPlbg9NkDKU7MPqaO71Akwviquv50DL/cPvDnt5fr5WY3EEhVKoaakP0NqLCZSqDAvVgp1kvNWJZJr18et84zpKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl; spf=pass smtp.mailfrom=linuxtv.org; arc=none smtp.client-ip=140.211.166.241 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxtv.org Received: from hverkuil by linuxtv.org with local (Exim 4.96) (envelope-from ) id 1sGaJ8-0000nn-1Q; Mon, 10 Jun 2024 08:23:14 +0000 From: Hans Verkuil Date: Mon, 27 May 2024 09:33:56 +0000 Subject: [git:media_stage/master] media: mgb4: Fix double debugfs remove Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: linuxtv-commits@linuxtv.org Cc: stable@vger.kernel.org, Martin Tůma Mail-followup-to: linux-media@vger.kernel.org Forward-to: linux-media@vger.kernel.org Reply-to: linux-media@vger.kernel.org Message-Id: This is an automatic generated email to let you know that the following patch were queued: Subject: media: mgb4: Fix double debugfs remove Author: Martin Tůma Date: Tue May 21 18:22:54 2024 +0200 Fixes an error where debugfs_remove_recursive() is called first on a parent directory and then again on a child which causes a kernel panic. Signed-off-by: Martin Tůma Signed-off-by: Hans Verkuil Fixes: 0ab13674a9bd ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver") Cc: [hverkuil: added Fixes/Cc tags] drivers/media/pci/mgb4/mgb4_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- diff --git a/drivers/media/pci/mgb4/mgb4_core.c b/drivers/media/pci/mgb4/mgb4_core.c index 60498a5abebf..ab4f07e2e560 100644 --- a/drivers/media/pci/mgb4/mgb4_core.c +++ b/drivers/media/pci/mgb4/mgb4_core.c @@ -642,9 +642,6 @@ static void mgb4_remove(struct pci_dev *pdev) struct mgb4_dev *mgbdev = pci_get_drvdata(pdev); int i; -#ifdef CONFIG_DEBUG_FS - debugfs_remove_recursive(mgbdev->debugfs); -#endif #if IS_REACHABLE(CONFIG_HWMON) hwmon_device_unregister(mgbdev->hwmon_dev); #endif @@ -659,6 +656,10 @@ static void mgb4_remove(struct pci_dev *pdev) if (mgbdev->vin[i]) mgb4_vin_free(mgbdev->vin[i]); +#ifdef CONFIG_DEBUG_FS + debugfs_remove_recursive(mgbdev->debugfs); +#endif + device_remove_groups(&mgbdev->pdev->dev, mgb4_pci_groups); free_spi(mgbdev); free_i2c(mgbdev);