diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-24 03:49:55 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-24 03:49:55 -0800 |
commit | 467388f29fc9cebfb70e7a187107b6b5d772cb44 (patch) | |
tree | 4e6fffa65f38addffc149a5fe88be3d2161eaf6e /drivers/firewire/fw-card.c | |
parent | 028e1415a78733fcd2cba4b4c001826cc37a373e (diff) | |
parent | f7e603ad8f78cd3b59e33fa72707da0cbabdf699 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r-- | drivers/firewire/fw-card.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index 7be2cf3514e7..a5dd7a665aa8 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -412,6 +412,7 @@ fw_card_add(struct fw_card *card, { u32 *config_rom; size_t length; + int err; card->max_receive = max_receive; card->link_speed = link_speed; @@ -422,7 +423,13 @@ fw_card_add(struct fw_card *card, list_add_tail(&card->link, &card_list); mutex_unlock(&card_mutex); - return card->driver->enable(card, config_rom, length); + err = card->driver->enable(card, config_rom, length); + if (err < 0) { + mutex_lock(&card_mutex); + list_del(&card->link); + mutex_unlock(&card_mutex); + } + return err; } EXPORT_SYMBOL(fw_card_add); |