MIPS: VPE: Select correct tc
authorHillf Danton <dhillf@gmail.com>
Thu, 4 Aug 2011 14:38:31 +0000 (22:38 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 17 Sep 2011 00:37:03 +0000 (02:37 +0200)
If we could find tc on the tc list for @index, the found tc should be returned.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2692/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/vpe.c

index 2cd50ad0d5c66ec04d4034c6bf81b690dd5cb1a8..3efcb065f78a4fcc9a55a842f7574ceb89d43f7a 100644 (file)
@@ -192,7 +192,7 @@ static struct tc *get_tc(int index)
        }
        spin_unlock(&vpecontrol.tc_list_lock);
 
-       return NULL;
+       return res;
 }
 
 /* allocate a vpe and associate it with this minor (or index) */