Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: imx: Fix boot crash if ocotp is not found
The imx_soc_device_init functions tries to fetch the ocotp regmap in order to soc serial number. If regmap fetch fails then a message is printed but regmap_read is called anyway and the system crashes. Failing to lookup ocotp regmap shouldn't be a fatal boot error so check that the pointer is valid. Only side-effect of ocotp lookup failure now is that serial number will be reported as all-zeros which is acceptable. Cc: [email protected] Fixes: 8267ff8 ("ARM: imx: Add serial number support for i.MX6/7 SoCs") Signed-off-by: Leonard Crestez <[email protected]> Tested-by: Christoph Niedermaier <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
- Loading branch information