Commit 606e56e4 authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Fix i4l subsystem crash

A loop over all drivers obviously should use ISDN_MAX_DRIVERS, not
ISDN_MAX_CHANNELS.
parent 50692f8c
...@@ -534,8 +534,7 @@ get_drv_by_nr(int di) ...@@ -534,8 +534,7 @@ get_drv_by_nr(int di)
unsigned long flags; unsigned long flags;
struct isdn_driver *drv; struct isdn_driver *drv;
if (di < 0) BUG_ON(di < 0 || di >= ISDN_MAX_DRIVERS);
return NULL;
spin_lock_irqsave(&drivers_lock, flags); spin_lock_irqsave(&drivers_lock, flags);
drv = drivers[di]; drv = drivers[di];
...@@ -1148,7 +1147,7 @@ get_slot_by_minor(int minor) ...@@ -1148,7 +1147,7 @@ get_slot_by_minor(int minor)
int di, ch; int di, ch;
struct isdn_driver *drv; struct isdn_driver *drv;
for (di = 0; di < ISDN_MAX_CHANNELS; di++) { for (di = 0; di < ISDN_MAX_DRIVERS; di++) {
drv = get_drv_by_nr(di); drv = get_drv_by_nr(di);
if (!drv) if (!drv)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment