summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-card.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-03-24 00:52:46 +0100
committerJames Morris <jmorris@namei.org>2009-03-24 00:52:46 +0100
commit703a3cd72817e99201cef84a8a7aecc60b2b3581 (patch)
tree3e943755178ff410694722bb031f523136fbc432 /drivers/firewire/fw-card.c
parentSELinux: inode_doinit_with_dentry drop no dentry printk (diff)
parentLinux 2.6.29 (diff)
downloadlinux-703a3cd72817e99201cef84a8a7aecc60b2b3581.tar.xz
linux-703a3cd72817e99201cef84a8a7aecc60b2b3581.zip
Merge branch 'master' into next
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r--drivers/firewire/fw-card.c9
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);