Skip to content

Commit e5cd534

Browse files
emilgooderalfbaechle
authored andcommitted
MIPS: Remove incorrect NULL check in local_flush_tlb_page()
We check that the struct vm_area_struct pointer vma is NULL and then dereference it a few lines below. The intent was to make sure vma is not NULL but this is not necessary since the bug pre-dates GIT history and seem to never have caused a problem. The tlb-4k and tlb-8k versions of local_flush_tlb_page() don't bother checking if vma is NULL, also vma is dereferenced before being passed to local_flush_tlb_page(), thus it is safe to remove this NULL check. Signed-off-by: Emil Goode <[email protected]> Reviewed-by: Jonas Gorski <[email protected]> Acked-by: Maciej W. Rozycki <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: John Crispin <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/7264/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 0fc0708 commit e5cd534

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/mm/tlb-r3k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
158158
{
159159
int cpu = smp_processor_id();
160160

161-
if (!vma || cpu_context(cpu, vma->vm_mm) != 0) {
161+
if (cpu_context(cpu, vma->vm_mm) != 0) {
162162
unsigned long flags;
163163
int oldpid, newpid, idx;
164164

0 commit comments

Comments
 (0)