ACPI: Missing test after ioremap()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux