diff options
Diffstat (limited to 'drivers/ata/libata-transport.c')
-rw-r--r-- | drivers/ata/libata-transport.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c index da1b144d8288..e386e5f35015 100644 --- a/drivers/ata/libata-transport.c +++ b/drivers/ata/libata-transport.c @@ -428,7 +428,9 @@ int ata_tlink_add(struct ata_link *link) goto tlink_err; } - transport_add_device(dev); + error = transport_add_device(dev); + if (error) + goto tlink_transport_err; transport_configure_device(dev); ata_for_each_dev(ata_dev, link, ALL) { @@ -443,6 +445,7 @@ int ata_tlink_add(struct ata_link *link) ata_tdev_delete(ata_dev); } transport_remove_device(dev); + tlink_transport_err: device_del(dev); tlink_err: transport_destroy_device(dev); |