aboutsummaryrefslogtreecommitdiff
path: root/drivers/uwb/uwbd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-17 09:44:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-17 09:44:09 -0700
commit3aee0605a41399063c0ad396f1f4267108f210d3 (patch)
treec9e3ce738c3d093dbd861c5a53b63157edd893c2 /drivers/uwb/uwbd.c
parentf4c3f03838ae47a92f2d15d48ddf68deae5d7ebb (diff)
parent0396c215f301e92677d1e9a064b405e31501dc1d (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: uwb: avoid radio controller reset loops uwb: stop uwbd thread if rc->start() fails uwb: handle radio controller events with out-of-range IDs correctly
Diffstat (limited to 'drivers/uwb/uwbd.c')
-rw-r--r--drivers/uwb/uwbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/uwb/uwbd.c b/drivers/uwb/uwbd.c
index 57bd6bfef37..5a777d8624d 100644
--- a/drivers/uwb/uwbd.c
+++ b/drivers/uwb/uwbd.c
@@ -187,12 +187,12 @@ int uwbd_event_handle_urc(struct uwb_event *evt)
event = le16_to_cpu(evt->notif.rceb->wEvent);
context = evt->notif.rceb->bEventContext;
- if (type > ARRAY_SIZE(uwbd_urc_evt_type_handlers))
+ if (type >= ARRAY_SIZE(uwbd_urc_evt_type_handlers))
goto out;
type_table = &uwbd_urc_evt_type_handlers[type];
if (type_table->uwbd_events == NULL)
goto out;
- if (event > type_table->size)
+ if (event >= type_table->size)
goto out;
handler = type_table->uwbd_events[event].handler;
if (handler == NULL)