summaryrefslogtreecommitdiffstats
path: root/physmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'physmap.c')
-rw-r--r--physmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/physmap.c b/physmap.c
index 4bba369..2246dfa 100644
--- a/physmap.c
+++ b/physmap.c
@@ -80,6 +80,8 @@ void physunmap(void *virt_addr, size_t len)
void *physmap(const char *descr, unsigned long phys_addr, size_t len)
{
+ void *virt_addr;
+
if (len == 0) {
printf_debug("Not mapping %s, zero size at 0x%08lx.\n",
descr, phys_addr);
@@ -96,7 +98,7 @@ void *physmap(const char *descr, unsigned long phys_addr, size_t len)
descr, (unsigned long)len, phys_addr);
}
- void *virt_addr = sys_physmap(phys_addr, len);
+ virt_addr = sys_physmap(phys_addr, len);
if (NULL == virt_addr) {
if (NULL == descr)
OpenPOWER on IntegriCloud