summaryrefslogtreecommitdiffstats
path: root/drivers/parisc/ccio-dma.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-03-17 20:34:30 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-03-17 20:34:30 +0100
commit79a21d572cf66968a2272fdf9711f835518256d9 (patch)
tree5fe3e4692fb8375faf8e1aeea1c2eae38c342250 /drivers/parisc/ccio-dma.c
parentefi/arm: Fix boot crash with CONFIG_CPUMASK_OFFSTACK=y (diff)
parentefi/esrt: Cleanup bad memory map log messages (diff)
downloadlinux-79a21d572cf66968a2272fdf9711f835518256d9.tar.xz
linux-79a21d572cf66968a2272fdf9711f835518256d9.zip
Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent
Pull a single UEFI fix from Ard: - Reduce the severity of the notice that appears when the ESRT table points to memory that is not covered by the memory map. It is scaring our users and interfering with their nice splash screens. Note that the ESRT may still be perfectly usable, and is currently (to my knowledge) not widely used to begin with.
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
-rw-r--r--drivers/parisc/ccio-dma.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index aeb073b5fe16..e32ca2ef9e54 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -1539,7 +1539,7 @@ static int __init ccio_probe(struct parisc_device *dev)
ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL);
if (ioc == NULL) {
printk(KERN_ERR MODULE_NAME ": memory allocation failure\n");
- return 1;
+ return -ENOMEM;
}
ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn";
@@ -1554,6 +1554,10 @@ static int __init ccio_probe(struct parisc_device *dev)
ioc->hw_path = dev->hw_path;
ioc->ioc_regs = ioremap_nocache(dev->hpa.start, 4096);
+ if (!ioc->ioc_regs) {
+ kfree(ioc);
+ return -ENOMEM;
+ }
ccio_ioc_init(ioc);
ccio_init_resources(ioc);
hppa_dma_ops = &ccio_ops;