diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2019-05-13 11:15:01 +0000 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2019-06-05 14:26:52 -0500 |
commit | 21560067fb1f5e87abedc3ecec5d46f67ac0c019 (patch) | |
tree | 6009697a30935d7b99166a58d9289acf4914bcfb /fs/isofs | |
parent | 5cfca8911ddd59150ba53cff16956eabe1b3dcac (diff) |
soc: fsl: qe: fold qe_get_num_of_snums into qe_snums_init
The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the
MPC8309 has 14. The code path returning -EINVAL is also a recipe for
instant disaster, since the caller (qe_snums_init) uncritically
assigns the return value to the unsigned qe_num_of_snum, and would
thus proceed to attempt to copy 4GB from snum_init_46[] to the snum[]
array.
So fold the handling of the legacy fsl,qe-num-snums into
qe_snums_init, and make sure we do not end up using the snum_init_46
array in cases other than the two where we know it makes sense.
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Qiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'fs/isofs')
0 files changed, 0 insertions, 0 deletions