linux-stable/drivers/nfc/nfcmrvl
Johan Hovold b694d8d9ec NFC: nfcmrvl_uart: fix OF child-node lookup
[ Upstream commit 5bf59773aa ]

Use the new of_get_compatible_child() helper to lookup the nfc child
node instead of using of_find_compatible_node(), which searches the
entire tree from a given start node and thus can return an unrelated
(i.e. non-child) node.

This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent node).

Fixes: e097dc624f ("NFC: nfcmrvl: add UART driver")
Fixes: d8e018c0b3 ("NFC: nfcmrvl: update device tree bindings for Marvell NFC")
Cc: stable <stable@vger.kernel.org>     # 4.2
Cc: Vincent Cuissard <cuissard@marvell.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-01 09:44:21 +01:00
..
fw_dnld.c NFC: nfcmrvl: Include unaligned.h instead of access_ok.h 2018-03-22 09:17:45 +01:00
fw_dnld.h NFC: nfcmrvl: add firmware download support 2015-10-27 04:18:44 +01:00
i2c.c NFC: nfcmrvl: update device tree bindings for Marvell NFC 2015-10-27 04:24:54 +01:00
Kconfig NFC: nfcmrvl: fix SPI driver dependencies 2015-11-05 00:32:25 +01:00
main.c NFC: nfcmrvl: fix firmware-management initialisation 2017-07-27 15:07:56 -07:00
Makefile NFC: nfcmrvl: add spi driver 2015-10-27 04:24:35 +01:00
nfcmrvl.h NFC: nfcmrvl: add i2c driver 2015-10-27 04:21:14 +01:00
spi.c NFC: nfcmrvl: double free on error path 2018-03-22 09:17:46 +01:00
uart.c NFC: nfcmrvl_uart: fix OF child-node lookup 2018-12-01 09:44:21 +01:00
usb.c NFC: nfcmrvl: configure head/tail room values per low level drivers 2015-10-27 04:19:44 +01:00