diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2019-12-10 23:49:28 +0200 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2019-12-12 10:44:28 +0800 |
commit | 7947e3238b64c00c396e6f5738f94c4d653bc6a2 (patch) | |
tree | 2433462645871c395bf399bfc0359f9e0f43c014 /drivers | |
parent | 46db63abb79524209c15c683feccfba116746757 (diff) | |
download | linux-7947e3238b64c00c396e6f5738f94c4d653bc6a2.tar.bz2 |
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: stable@vger.kernel.org
Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions