Revert "ata: libata: Fix memory leak for error path in ata_host_alloc()"
This reverts commit f51ad3cb56
.
This commit is contained in:
parent
1061ec7626
commit
7dc3729a31
1 changed files with 1 additions and 3 deletions
|
@ -5429,10 +5429,8 @@ struct ata_host *ata_host_alloc(struct device *dev, int max_ports)
|
|||
}
|
||||
|
||||
dr = devres_alloc(ata_devres_release, 0, GFP_KERNEL);
|
||||
if (!dr) {
|
||||
kfree(host);
|
||||
if (!dr)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
devres_add(dev, dr);
|
||||
dev_set_drvdata(dev, host);
|
||||
|
|
Loading…
Add table
Reference in a new issue