pinctrl: imx: Fix NULL dereference in imx_pinctrl_probe()
When converting to ofnode `ofnode_read_u32` was accedentally used to
replace `fdtdec_get_int` instead of `ofnode_read_u32_default`.
Use `ofnode_read_u32_default` to fix this.
Fixes: 59382d2
("pinctrl: imx: Convert to use livetree API for fdt access")
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
This commit is contained in:

committed by
Fabio Estevam

parent
252ad9890d
commit
bb060231b6
@@ -219,7 +219,7 @@ int imx_pinctrl_probe(struct udevice *dev,
|
||||
if (info->flags & IMX8_USE_SCU)
|
||||
return 0;
|
||||
|
||||
addr = ofnode_get_addr_size_index(dev_ofnode(dev), 0, &size);
|
||||
addr = ofnode_get_addr_size_index(node, 0, &size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -228,7 +228,7 @@ int imx_pinctrl_probe(struct udevice *dev,
|
||||
return -ENOMEM;
|
||||
priv->info = info;
|
||||
|
||||
info->mux_mask = ofnode_read_u32(node, "fsl,mux_mask", 0);
|
||||
info->mux_mask = ofnode_read_u32_default(node, "fsl,mux_mask", 0);
|
||||
/*
|
||||
* Refer to linux documentation for details:
|
||||
* Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
|
||||
|
Reference in New Issue
Block a user