From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Message-ID: <1537896555.11137.22.camel@acm.org> Subject: Re: [PATCH v7 02/13] PCI/P2PDMA: Add sysfs group to display p2pmem stats From: Bart Van Assche To: Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Christian =?ISO-8859-1?Q?K=F6nig?= , Jens Axboe Date: Tue, 25 Sep 2018 10:29:15 -0700 In-Reply-To: <20180925162231.4354-3-logang@deltatee.com> References: <20180925162231.4354-1-logang@deltatee.com> <20180925162231.4354-3-logang@deltatee.com> Content-Type: text/plain; charset="UTF-7" Mime-Version: 1.0 List-ID: On Tue, 2018-09-25 at 10:22 -0600, Logan Gunthorpe wrote: +AD4 +AEAAQA -83,9 +-132,14 +AEAAQA static int pci+AF8-p2pdma+AF8-setup(struct pci+AF8-dev +ACo-pdev) +AD4 +AD4 pdev-+AD4-p2pdma +AD0 p2p+ADs +AD4 +AD4 +- error +AD0 sysfs+AF8-create+AF8-group(+ACY-pdev-+AD4-dev.kobj, +ACY-p2pmem+AF8-group)+ADs +AD4 +- if (error) +AD4 +- goto out+AF8-pool+AF8-destroy+ADs +AD4 +- +AD4 return 0+ADs +AD4 +AD4 out+AF8-pool+AF8-destroy: +AD4 +- pdev-+AD4-p2pdma +AD0 NULL+ADs +AD4 gen+AF8-pool+AF8-destroy(p2p-+AD4-pool)+ADs +AD4 out: +AD4 devm+AF8-kfree(+ACY-pdev-+AD4-dev, p2p)+ADs This doesn't look right to me. Shouldn't devm+AF8-remove+AF8-action() be called instead of devm+AF8-kfree() if sysfs+AF8-create+AF8-group() fails? Thanks, Bart.