summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/icn
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-08-08 16:13:15 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-08 16:21:32 -0700
commit138b9dd1fd7b44176af4f3b672060c790b0eaf55 (patch)
treeaba0bffcaaee3fd29c1e3142a4c10331b4858293 /drivers/isdn/icn
parent92e52b2e82bec10a70744d4a2b04e0ff2dfe2c98 (diff)
downloadop-kernel-dev-138b9dd1fd7b44176af4f3b672060c790b0eaf55.zip
op-kernel-dev-138b9dd1fd7b44176af4f3b672060c790b0eaf55.tar.gz
[PATCH] icn driver fails to unload when no hardware present
Fix a null dereference in module unload path. Found by a simple modprobe icn ; rmmod icn Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/icn')
-rw-r--r--drivers/isdn/icn/icn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
index e0d1b01..386df71 100644
--- a/drivers/isdn/icn/icn.c
+++ b/drivers/isdn/icn/icn.c
@@ -1650,7 +1650,7 @@ static void __exit icn_exit(void)
{
isdn_ctrl cmd;
icn_card *card = cards;
- icn_card *last;
+ icn_card *last, *tmpcard;
int i;
unsigned long flags;
@@ -1670,8 +1670,9 @@ static void __exit icn_exit(void)
for (i = 0; i < ICN_BCH; i++)
icn_free_queue(card, i);
}
- card = card->next;
+ tmpcard = card->next;
spin_unlock_irqrestore(&card->lock, flags);
+ card = tmpcard;
}
card = cards;
cards = NULL;
OpenPOWER on IntegriCloud