diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2011-10-28 12:48:32 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2011-10-28 12:48:32 +0000 |
commit | 5b3b28da23495ad7c5eb79e4b9df8ba703e18c17 (patch) | |
tree | 21318f85d33a60bf922ee83111b7fdb7acc9875e /sys/dev | |
parent | 86ff089eb5ec00cdb0d432998033cd12abd66d28 (diff) |
Fix bogus frame selection check in uvideo_vs_negotiation().
From Pedro Martelletto
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uvideo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 0e3dd60d3c7..abaf9ed5d9d 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.165 2011/09/18 23:24:12 krw Exp $ */ +/* $OpenBSD: uvideo.c,v 1.166 2011/10/28 12:48:31 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -1414,11 +1414,11 @@ uvideo_vs_negotiation(struct uvideo_softc *sc, int commit) frame = fmtgrp->frame[i]; break; } - if (i == fmtgrp->frame_num) { - DPRINTF(1, "%s: %s: invalid frame index 0x%x\n", - DEVNAME(sc), __func__, pc->bFrameIndex); - return (USBD_INVAL); - } + } + if (i == fmtgrp->frame_num) { + DPRINTF(1, "%s: %s: invalid frame index 0x%x\n", + DEVNAME(sc), __func__, pc->bFrameIndex); + return (USBD_INVAL); } } else frame = fmtgrp->frame_cur; |