diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index 8038c599ad83..6bf3e6a980ff 100644 --- a/drivers/soc/fsl/guts.c +++ b/drivers/soc/fsl/guts.c @@ -126,6 +126,10 @@ static u64 fsl_guts_get_soc_uid(const char *compat, unsigned int offset) return 0; sfp_base = of_iomap(np, 0); + if (!sfp_base) { + of_node_put(np); + return 0; + } uid = ioread32(sfp_base + offset); uid <<= 32;