Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571172
| From | Netanel Belgazal <netanel@annapurnalabs.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 net-next 02/14] net/ena: fix error handling when probe fails |
| Date | 2017-01-31 23:20 +0100 |
| Message-ID | <t5OWl-6cJ-13@gated-at.bofh.it> (permalink) |
| References | <t40yB-4uo-5@gated-at.bofh.it> <t40yB-4uo-3@gated-at.bofh.it> <t4ohz-27i-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi, You are right. I'll remove this patch. Regards, Netanel On 01/28/2017 01:33 AM, Lino Sanfilippo wrote: > Hi, > > On 26.01.2017 23:18, Netanel Belgazal wrote: >> When driver fails in probe, it will release all resources, >> including adapter. >> In case of probe failure, ena_remove should not try to >> free the adapter resources. >> >> Signed-off-by: Netanel Belgazal <netanel@annapurnalabs.com> >> --- >> drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c >> b/drivers/net/ethernet/amazon/ena/ena_netdev.c >> index 7493ea3..cb60567 100644 >> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c >> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c >> @@ -3046,6 +3046,7 @@ static int ena_probe(struct pci_dev *pdev, >> const struct pci_device_id *ent) >> err_free_region: >> ena_release_bars(ena_dev, pdev); >> err_free_ena_dev: >> + pci_set_drvdata(pdev, NULL); >> vfree(ena_dev); >> err_disable_device: >> pci_disable_device(pdev); >> > > Is this change really a "fix"? remove() should only be called if > probe() has been successful before, otherwise not. Did you experience > something different? > > Regards, > Lino
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH V3 net-next 02/14] net/ena: fix error handling when probe fails Netanel Belgazal <netanel@annapurnalabs.com> - 2017-01-31 23:20 +0100
csiph-web