projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1448d7c
)
firewire: core: Remove card from list of cards when enable fails
author
Petr Vandrovec
<
[email protected]
>
Sun, 1 Feb 2009 09:29:35 +0000
(
01:29
-0800)
committer
Stefan Richter
<
[email protected]
>
Sun, 1 Feb 2009 10:17:24 +0000
(11:17 +0100)
Signed-off-by: Petr Vandrovec <
[email protected]
>
After a controller initialization failure, addition of another card got
stuck due to card_list corruption.
Signed-off-by: Stefan Richter <
[email protected]
>
drivers/firewire/fw-card.c
patch
|
blob
|
history
diff --git
a/drivers/firewire/fw-card.c
b/drivers/firewire/fw-card.c
index 7be2cf3514e71e06164ec64d2aa8a97eaacdca44..a5dd7a665aa89e1551dd89653af01234a0d2adc8 100644
(file)
--- 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);