nios2: fix bootm error on fdt args
authorThomas Chou <thomas@wytron.com.tw>
Fri, 30 Jul 2010 06:12:12 +0000 (14:12 +0800)
committerScott McNutt <smcnutt@psyent.com>
Fri, 20 Aug 2010 02:15:49 +0000 (22:15 -0400)
commit62a05573822fc253a1ad5037482511347d6abaa5
tree57a615421c5bc65a4496a7de576d0e3b01d9f080
parentbd2313078114c4b44c4a5ce149af43bcb7fc8854
nios2: fix bootm error on fdt args

We should check argv[3] only if there are enough args. Otherwise,
it might cause invalid memory access fault.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
arch/nios2/lib/bootm.c