summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/include/ipxe/x86_io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/include/ipxe/x86_io.h b/src/arch/x86/include/ipxe/x86_io.h
index adb00a686..1fc7f6608 100644
--- a/src/arch/x86/include/ipxe/x86_io.h
+++ b/src/arch/x86/include/ipxe/x86_io.h
@@ -45,7 +45,7 @@ IOAPI_INLINE ( x86, bus_to_phys ) ( unsigned long bus_addr ) {
static inline __always_inline void *
IOAPI_INLINE ( x86, ioremap ) ( unsigned long bus_addr, size_t len __unused ) {
- return phys_to_virt ( bus_addr );
+ return ( bus_addr ? phys_to_virt ( bus_addr ) : NULL );
}
static inline __always_inline void