An error occurred while fetching folder content.
mfd: twl6040: Fix child-node lookup
Johan Hovold authored
commit 85e9b13c upstream.

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent node was prematurely freed, while the
child node was leaked.

Note that the CONFIG_OF compile guard can be removed as
of_get_child_by_name() provides a !CONFIG_OF implementation which always
fails.

Fixes: 37e13cec ("mfd: Add support for Device Tree to twl6040")
Fixes: ca2cad6a

 ("mfd: Fix twl6040 build failure")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
becf7d87
Name Last commit Last update
..
88pm800.c mfd: Drop owner assignment from i2c_drivers
88pm805.c mfd: Drop owner assignment from i2c_drivers
88pm80x.c mfd: Use to_i2c_client() instead of open-coding it
88pm860x-core.c mfd: 88pm860x-core: Fix commenting and declaration spacing
88pm860x-i2c.c mfd: 88pm860x-i2c: Fix variable length array Sparse warning
Kconfig Merge tag 'mfd-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Makefile Merge tag 'mfd-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
aat2870-core.c mfd: aat2870-core: Remove unnecessary 'out of memory' message
ab3100-core.c mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch
ab3100-otp.c mfd: ab2100-otp: Remove pointless 'out of memory' error message
ab8500-core.c mfd: db8500 stop passing around platform data
ab8500-debugfs.c mfd: ab8500-debugfs: Remove 'weak' function suspend_test_wake_cause_interrupt_is_mine()
ab8500-gpadc.c mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error
ab8500-sysctrl.c mfd: ab8500-sysctrl: Handle probe deferral
abx500-core.c mfd: abx500-core: Remove unused function abx500_dump_all_banks()
ac100.c mfd: ac100: Add driver for X-Powers AC100 audio codec / RTC combo IC
act8945a.c mfd: act8945a: Add .of_compatible for act8945a-charger
adp5520.c mfd: adp5520: Some trivial 'no space before tab' fixes
altera-a10sr.c mfd: altera-a10sr: Make it explicitly non-modular
arizona-core.c mfd: arizona: Handle probe deferral for reset GPIO
arizona-i2c.c mfd: arizona-i2c: Add blank line formatting after declaration
arizona-irq.c mfd: arizona: Check if AOD interrupts are pending before dispatching
arizona-spi.c mfd: arizona: Support Cirrus Logic CS47L24 and WM1831
arizona.h mfd: arizona: Support Cirrus Logic CS47L24 and WM1831
as3711.c mfd: as3711: Use devm_mfd_add_devices() for mfd_device registration
as3722.c
asic3.c
atmel-flexcom.c
atmel-hlcdc.c
axp20x-i2c.c
axp20x-rsb.c
axp20x.c
bcm590xx.c
cros_ec.c
cros_ec_i2c.c
cros_ec_spi.c
cs47l24-tables.c
cs5535-mfd.c
da903x.c
da9052-core.c
da9052-i2c.c
da9052-irq.c
da9052-spi.c
da9055-core.c
da9055-i2c.c
da9062-core.c
da9063-core.c
da9063-i2c.c
da9063-irq.c
da9150-core.c
davinci_voicecodec.c
db8500-prcmu.c
dbx500-prcmu-regs.h
dln2.c
dm355evm_msp.c
exynos-lpass.c
ezx-pcap.c
fsl-imx25-tsadc.c
hi6421-pmic-core.c
hi655x-pmic.c
htc-i2cpld.c
htc-pasic3.c
intel-lpss-acpi.c
intel-lpss-pci.c
intel-lpss.c
intel-lpss.h
intel_msic.c
intel_quark_i2c_gpio.c
intel_soc_pmic_bxtwc.c
intel_soc_pmic_core.c
intel_soc_pmic_core.h
intel_soc_pmic_crc.c
ipaq-micro.c
janz-cmodio.c
jz4740-adc.c
kempld-core.c
lm3533-core.c
lm3533-ctrlbank.c
lp3943.c
lp873x.c
lp8788-irq.c
lp8788.c
lpc_ich.c
lpc_sch.c
max14577.c
max77620.c
max77686.c
max77693.c
max77843.c
max8907.c
max8925-core.c
max8925-i2c.c
max8997-irq.c
max8997.c
max8998-irq.c
max8998.c
mc13xxx-core.c
mc13xxx-i2c.c
mc13xxx-spi.c
mc13xxx.h