Messages in this thread Patch in this message | | | Date | Tue, 22 Apr 2014 21:52:06 +0200 | From | Pavel Machek <> | Subject | [PATCHv2] radio-bcm2048.c: fix wrong overflow check |
| |
From: Pali Rohár <pali.rohar@gmail.com>
Fix wrong overflow check in radio-bcm2048.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> ---
Nothing in patch changed, just added CCs, and From/Reported-by headers.
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index b2cd3a8..bbf236e 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -737,7 +737,7 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region) int err; u32 new_frequency = 0; - if (region > ARRAY_SIZE(region_configs)) + if (region >= ARRAY_SIZE(region_configs)) return -EINVAL; mutex_lock(&bdev->mutex); -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |