* ACPI: Missing test after ioremap()?
@ 2009-07-30 16:19 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-07-30 16:19 UTC (permalink / raw)
To: lenb, linux-acpi
Isn't a test missing after the ioremap()?
and if so can we error out like this?
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 7167071..b1eeecc 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -496,6 +496,9 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
+ if (virt_addr == NULL)
+ return AE_ERROR;
+
if (!value)
value = &dummy;
@@ -524,6 +527,8 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
+ if (virt_addr == NULL)
+ return AE_ERROR;
switch (width) {
case 8:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-30 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 16:19 ACPI: Missing test after ioremap()? Roel Kluin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.