linux-stable/drivers/of
Frank Rowand 367e64ce11 of: unittest: initialize args before calling of_*parse_*()
[ Upstream commit eeb07c573e ]

Callers of of_irq_parse_one() blindly use the pointer args.np
without checking whether of_irq_parse_one() had an error and
thus did not set the value of args.np.  Initialize args to
zero so that using the format "%pOF" to show the value of
args.np will show "(null)" when of_irq_parse_one() has an
error.  This prevents the dereference of a random value.

Make the same fix for callers of of_parse_phandle_with_args()
and of_parse_phandle_with_args_map().

Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Alan Tull <atull@kernel.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-01 09:17:30 +01:00
..
unittest-data of/unittest: Fix I2C bus unit-address error 2019-11-20 18:47:00 +01:00
address.c
base.c of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC 2019-11-20 18:46:06 +01:00
device.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
dynamic.c of: overlay: set node fields from properties when add new overlay node 2019-06-09 09:17:24 +02:00
fdt.c
fdt_address.c
irq.c
Kconfig
kobj.c of: overlay: add missing of_node_get() in __of_attach_node_sysfs 2019-02-06 17:30:15 +01:00
Makefile
of_mdio.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
of_net.c
of_numa.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
of_private.h of: __of_detach_node() - remove node from phandle cache 2019-01-13 09:51:10 +01:00
of_reserved_mem.c
overlay.c of: overlay: set node fields from properties when add new overlay node 2019-06-09 09:17:24 +02:00
pdt.c
platform.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
property.c OF: properties: add missing of_node_put 2019-01-22 21:40:33 +01:00
resolver.c
unittest.c of: unittest: initialize args before calling of_*parse_*() 2019-12-01 09:17:30 +01:00