linux-brain/arch/arm/mach-integrator
Nicholas Mc Guire 420070af36 gpio: pl061: handle failed allocations
[ Upstream commit df209c43a0 ]

devm_kzalloc(), devm_kstrdup() and devm_kasprintf() all can
fail internal allocation and return NULL. Using any of the assigned
objects without checking is not safe. As this is early in the boot
phase and these allocations really should not fail, any failure here
is probably an indication of a more serious issue so it makes little
sense to try and rollback the previous allocated resources or try to
continue;  but rather the probe function is simply exited with -ENOMEM.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 684284b64a ("ARM: integrator: add MMCI device to IM-PD1")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-20 10:18:30 +01:00
..
cm.h ARM: integrator: move restart to the device tree 2014-11-13 10:32:02 +01:00
common.h soc: move SoC driver for the ARM Integrator 2014-11-13 10:32:05 +01:00
core.c soc: move SoC driver for the ARM Integrator 2014-11-13 10:32:05 +01:00
hardware.h ARM: integrator: localize the hardware.h header 2014-02-26 13:49:07 +01:00
impd1.c gpio: pl061: handle failed allocations 2019-02-20 10:18:30 +01:00
impd1.h ARM: integrator: localize the impd1.h header 2014-02-26 13:49:06 +01:00
integrator_ap.c ARM: integrator: cut down on static maps 2016-08-31 09:30:33 +02:00
integrator_cp.c ARM: integrator: read counter using syscon/regmap 2016-08-31 09:30:34 +02:00
Kconfig ARM: stop *MIGHT_HAVE_PCI* config from being selected redundantly 2016-09-21 22:45:05 +02:00
lm.c ARM: integrator: localize the lm.h header 2014-02-26 13:49:05 +01:00
lm.h ARM: integrator: localize the lm.h header 2014-02-26 13:49:05 +01:00
Makefile ARM: integrator: move core module LED to device tree 2014-11-13 10:32:04 +01:00
pci_v3.c ARM: integrator: Convert PCI to use generic config accessors 2015-01-29 08:34:42 -06:00
pci_v3.h ARM: mach-integrator: Add stub for pci_v3_early_init() for !CONFIG_PCI 2013-09-25 21:59:52 -07:00