powerpc/mpc85xx: Check return value of find_tlb_idx
authorYork Sun <yorksun@freescale.com>
Wed, 25 Jun 2014 04:16:20 +0000 (21:16 -0700)
committerYork Sun <yorksun@freescale.com>
Tue, 22 Jul 2014 23:25:54 +0000 (16:25 -0700)
commit9d0456822c4fec302608d4161ae9d9cfe81100b1
tree99bd746329769a750488156d567f86ff3021fd4c
parent8340e7ac86ad3c59956e8f0bd627b741e5209439
powerpc/mpc85xx: Check return value of find_tlb_idx

find_tlb_idx() is called in board_early_init_r() on multiple boards.
The return value is not checked before being used to disable a TLB.
In normal case the return value wouldn't be -1. In case of a mis-
configuration during porting to a new board, checking the return value
may be helpful to reveal some user errors.

Signed-off-by: York Sun <yorksun@freescale.com>
22 files changed:
board/exmeritus/hww1u1a/hww1u1a.c
board/freescale/b4860qds/b4860qds.c
board/freescale/bsc9132qds/bsc9132qds.c
board/freescale/c29xpcie/c29xpcie.c
board/freescale/corenet_ds/corenet_ds.c
board/freescale/mpc8536ds/mpc8536ds.c
board/freescale/mpc8572ds/mpc8572ds.c
board/freescale/p1010rdb/p1010rdb.c
board/freescale/p1022ds/p1022ds.c
board/freescale/p1023rdb/p1023rdb.c
board/freescale/p1_p2_rdb/p1_p2_rdb.c
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
board/freescale/p1_twr/p1_twr.c
board/freescale/p2020ds/p2020ds.c
board/freescale/p2041rdb/p2041rdb.c
board/freescale/t1040qds/t1040qds.c
board/freescale/t104xrdb/t104xrdb.c
board/freescale/t208xqds/t208xqds.c
board/freescale/t208xrdb/t208xrdb.c
board/freescale/t4qds/t4240emu.c
board/freescale/t4qds/t4240qds.c
board/freescale/t4rdb/t4240rdb.c