[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90A7E81AE28BAE4CBDDB3B35F187D2644071DC62@CHN-SV-EXMX02.mchp-main.com>
Date: Thu, 22 Feb 2018 21:31:30 +0000
From: <Bryan.Whitehead@...rochip.com>
To: <andrew@...n.ch>
CC: <davem@...emloft.net>, <UNGLinuxDriver@...rochip.com>,
<netdev@...r.kernel.org>
Subject: RE: [PATCH v2 net-next 1/2] lan743x: Add main source files for new
lan743x driver
> > +static void lan743x_intr_unregister_isr(struct lan743x_adapter *adapter,
> > + int vector_index)
> > +{
> > + struct lan743x_vector *vector = &adapter->intr.vector_list
> > + [vector_index];
> > +
> > + devm_free_irq(&adapter->pci.pdev->dev, vector->irq, vector);
>
> Hu Bryan
>
> The point of devm_ is that you don't need to free resources you have
> allocated using devm_. The core will release them when the device is
> removed.
Hi Andrew,
When I remove the call devm_free_irq, I get a segmentation fault on close
in pci_disable_msix. Did I do something else wrong?
Also I'm allocating interrupt resources on interface up, and freeing resources
on interface down. So if there is an up, down, up sequence then the driver
will allocate resources twice. In order for devm to work properly, should I
move all resource allocation into the probe function?
Bryan
Powered by blists - more mailing lists