diff options
author | John Crispin <blogic@openwrt.org> | 2013-02-16 19:16:15 -0500 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-02-19 03:36:40 -0500 |
commit | 535237cecab2b078114be712c67e89a0db61965f (patch) | |
tree | 04c027bf686228b3c3544fe3fb3cbc0041f298fa /arch | |
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')
-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 147cec19621d..0e0fdb783b7c 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -697,18 +697,7 @@ static int vpe_run(struct vpe * v) | |||
697 | dmt_flag = dmt(); | 697 | dmt_flag = dmt(); |
698 | vpeflags = dvpe(); | 698 | vpeflags = dvpe(); |
699 | 699 | ||
700 | if (!list_empty(&v->tc)) { | 700 | if (list_empty(&v->tc)) { |
701 | if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) { | ||
702 | evpe(vpeflags); | ||
703 | emt(dmt_flag); | ||
704 | local_irq_restore(flags); | ||
705 | |||
706 | printk(KERN_WARNING | ||
707 | "VPE loader: TC %d is already in use.\n", | ||
708 | v->tc->index); | ||
709 | return -ENOEXEC; | ||
710 | } | ||
711 | } else { | ||
712 | evpe(vpeflags); | 701 | evpe(vpeflags); |
713 | emt(dmt_flag); | 702 | emt(dmt_flag); |
714 | local_irq_restore(flags); | 703 | local_irq_restore(flags); |
@@ -720,6 +709,8 @@ static int vpe_run(struct vpe * v) | |||
720 | return -ENOEXEC; | 709 | return -ENOEXEC; |
721 | } | 710 | } |
722 | 711 | ||
712 | t = list_first_entry(&v->tc, struct tc, tc); | ||
713 | |||
723 | /* Put MVPE's into 'configuration state' */ | 714 | /* Put MVPE's into 'configuration state' */ |
724 | set_c0_mvpcontrol(MVPCONTROL_VPC); | 715 | set_c0_mvpcontrol(MVPCONTROL_VPC); |
725 | 716 | ||