diff options
author | John Crispin <blogic@openwrt.org> | 2013-02-17 01:16:15 +0100 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-02-19 09:36:40 +0100 |
commit | 535237cecab2b078114be712c67e89a0db61965f (patch) | |
tree | 04c027bf686228b3c3544fe3fb3cbc0041f298fa /arch/mips | |
parent | df1cc3da2134bc10e6edc62709013a10e03e4106 (diff) |
MIPS: remove broken conditional inside vpe loader code
The commit [1] breaks builds and results in the following error
arch/mips/kernel/vpe.c: In function 'vpe_run':
arch/mips/kernel/vpe.c:708:16: error: invalid type argument of '->' (have 'struct list_head')
Taking a closer look at the conditional we notice that list_first_entry wont
ever return NULL. The easiest fix is to just drop the dead code.
[1]
commit 3d2d03247632920aa21b42a0b032a4ffd44ce15e
MIPS: vpe.c: Fix null pointer dereference in print arguments.
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/vpe.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 147cec19621..0e0fdb783b7 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c @@ -697,18 +697,7 @@ static int vpe_run(struct vpe * v) dmt_flag = dmt(); vpeflags = dvpe(); - if (!list_empty(&v->tc)) { - if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) { - evpe(vpeflags); - emt(dmt_flag); - local_irq_restore(flags); - - printk(KERN_WARNING - "VPE loader: TC %d is already in use.\n", - v->tc->index); - return -ENOEXEC; - } - } else { + if (list_empty(&v->tc)) { evpe(vpeflags); emt(dmt_flag); local_irq_restore(flags); @@ -720,6 +709,8 @@ static int vpe_run(struct vpe * v) return -ENOEXEC; } + t = list_first_entry(&v->tc, struct tc, tc); + /* Put MVPE's into 'configuration state' */ set_c0_mvpcontrol(MVPCONTROL_VPC); |