mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
rar: Fix off by one error
It looks like there is an off-by-one error in one of your changes to drivers/staging/rar_register/rar_register.c: Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
577ba406e1
commit
a9728c9a31
@ -145,7 +145,7 @@ static void free_rar_device(struct rar_device *rar)
|
||||
*/
|
||||
static struct rar_device *_rar_to_device(int rar, int *off)
|
||||
{
|
||||
if (rar >= 0 && rar <= 3) {
|
||||
if (rar >= 0 && rar < MRST_NUM_RAR) {
|
||||
*off = rar;
|
||||
return &my_rar_device;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user