From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 851DFC433E0 for ; Tue, 4 Aug 2020 16:42:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A3D52064B for ; Tue, 4 Aug 2020 16:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596559350; bh=d3uaiTv0Ga0UKUyb/DBtTQ3erGKWoEO0Ny8JGoOpI2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=1zoiHvqPT1jxIhmzlKQOP5h1aApR3ziyOiyEtaEwCpmAeknfj8ax1Y7svkq67NqzD ArzRRjUAwljSydyRg6SCk17l8E/K5QrigkGLpBcD8sJvdBXhV0XTS609Z0Y1FVyVBB AEuoU1WbAf9OsnhD7VDWl75dmkukJcSZIbZOROSk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729883AbgHDQm3 (ORCPT ); Tue, 4 Aug 2020 12:42:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728678AbgHDQm1 (ORCPT ); Tue, 4 Aug 2020 12:42:27 -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 42A222064B; Tue, 4 Aug 2020 16:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596559346; bh=d3uaiTv0Ga0UKUyb/DBtTQ3erGKWoEO0Ny8JGoOpI2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HDegcDZ7nagJV+SMTFAJ1bgoiG6iWF2OiUhEiTH6b0vq2i0EZAgTPYy/yESW9liEo 7PWsHc9KwOblEb5l0LrWJJiXI7mrhy1vqS6cc5vriB8+Z7c9AoOBhpQZLa7VlbQi7i kdpJzcbn0UioADmv/A+8sMdXMwkwy/YHILLc51g0= Date: Tue, 4 Aug 2020 18:42:46 +0200 From: Greg Kroah-Hartman To: Daniel Gutson Cc: Derek Kiernan , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Arnd Bergmann , Mauro Carvalho Chehab , linux-kernel , Richard Hughes , Alex Bazhaniuk Subject: Re: [PATCH] Platform lockdown information in SYSFS Message-ID: <20200804164246.GA502540@kroah.com> References: <20200730214136.5534-1-daniel.gutson@eclypsium.com> <20200731070053.GC1518178@kroah.com> <20200731141503.GA1717752@kroah.com> <20200804064154.GE696690@kroah.com> <20200804142250.GA247448@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 04, 2020 at 11:37:02AM -0300, Daniel Gutson wrote: > static void mypci_remove(struct pci_dev *pdev) > { > /* > I tried enabling and disabling this > if (child_device != NULL) { > put_device(child_device); > device_unregister(child_device); > } > */ You can just call device_destroy() here, but this should be the same. But, if you have it commented out, that's not good, you have to clean this up. > class_remove_file(&my_class, &class_attr_howareyou); You don't always have to remove files you create, but it doesn't hurt. > class_unregister(&my_class); class_destroy()? But this is the same as well, so all is good. Try running without the above code commented out. greg k-h