projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15a0b3f
)
radio-bcm2048.c: fix wrong overflow check
author
Pali Rohár
<pali.rohar@gmail.com>
Tue, 22 Apr 2014 12:57:26 +0000
(15:57 +0300)
committer
Jiri Kosina
<jkosina@suse.cz>
Mon, 5 May 2014 13:34:08 +0000
(15:34 +0200)
This patch fixes an off by one check in bcm2048_set_region().
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/staging/media/bcm2048/radio-bcm2048.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/media/bcm2048/radio-bcm2048.c
b/drivers/staging/media/bcm2048/radio-bcm2048.c
index b2cd3a85166d7477610115b4c026cf69079baadf..bbf236e842a99f005a6f8e802d5c71f49c66b22d 100644
(file)
--- 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);