Skip to content
Commit 2f3cf916 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Stefano Babic
Browse files

ARM: imx: imx8mp: fix enable_i2c_clk



In order for i2c_num==4 and 5 to stay invalid for non-imx8mp SOCs, the
i2c_ccgr[] array must be sized by the number of initializers present,
not with a hard-coded 6 which would implicitly initialize the last two
elements with zeroes.

Also, the bounds check is off-by-one.

Fixes: c92c3a44 "ARM: imx: imx8mp: Enable support for i2c5 and i2c6 on i.MX8MP"
Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
parent 9098facd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment