From: Ossama Othman Date: Tue, 24 Aug 2010 11:55:14 +0000 (+0100) Subject: rar: Fix off by one error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9728c9a31524ef927260096411ee85c8ee6b163;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/platform/x86/intel_rar_register.c b/drivers/platform/x86/intel_rar_register.c index 73f8e6d72669..2b11a33325e6 100644 --- a/drivers/platform/x86/intel_rar_register.c +++ b/drivers/platform/x86/intel_rar_register.c @@ -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; }