Commit 1daf9ce74e0e0ef8ffde800ab495339458c3375f
Committed by
Jeff Garzik
1 parent
074b8ba386
Exists in
master
and in
7 other branches
sata_nv: fix fallout of devres conversion
As with all other drivers, sata_nv's hpriv is allocated with devm_kzalloc() and there's no need to free it explicitly. Kill nv_remove_one() which incorrectly used kfree() instead of devm_kfree() and use ata_pci_remove_one() directly. Original fix is from Peer Chen. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Showing 1 changed file with 1 additions and 11 deletions Side-by-side Diff
drivers/ata/sata_nv.c
... | ... | @@ -229,7 +229,6 @@ |
229 | 229 | #define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & ( 1 << (19 + (12 * (PORT))))) |
230 | 230 | |
231 | 231 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); |
232 | -static void nv_remove_one (struct pci_dev *pdev); | |
233 | 232 | #ifdef CONFIG_PM |
234 | 233 | static int nv_pci_device_resume(struct pci_dev *pdev); |
235 | 234 | #endif |
... | ... | @@ -300,7 +299,7 @@ |
300 | 299 | .suspend = ata_pci_device_suspend, |
301 | 300 | .resume = nv_pci_device_resume, |
302 | 301 | #endif |
303 | - .remove = nv_remove_one, | |
302 | + .remove = ata_pci_remove_one, | |
304 | 303 | }; |
305 | 304 | |
306 | 305 | static struct scsi_host_template nv_sht = { |
... | ... | @@ -1605,15 +1604,6 @@ |
1605 | 1604 | pci_set_master(pdev); |
1606 | 1605 | return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler, |
1607 | 1606 | IRQF_SHARED, ppi[0]->sht); |
1608 | -} | |
1609 | - | |
1610 | -static void nv_remove_one (struct pci_dev *pdev) | |
1611 | -{ | |
1612 | - struct ata_host *host = dev_get_drvdata(&pdev->dev); | |
1613 | - struct nv_host_priv *hpriv = host->private_data; | |
1614 | - | |
1615 | - ata_pci_remove_one(pdev); | |
1616 | - kfree(hpriv); | |
1617 | 1607 | } |
1618 | 1608 | |
1619 | 1609 | #ifdef CONFIG_PM |