From 3ef3b736dcee1d5d3e9e7654a00deed64f40333d Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Wed, 31 Oct 2012 04:23:36 +0000 Subject: [PATCH] If the CF physical base is 0, attach no CF devices. This fixes a warning about a 0 passed to cvmx_phys_to_ptr on systems without a CF interface, such as the RSYS4GBE. --- sys/mips/cavium/octeon_ebt3000_cf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/mips/cavium/octeon_ebt3000_cf.c b/sys/mips/cavium/octeon_ebt3000_cf.c index 16ae79ebc070..287005b42bb2 100644 --- a/sys/mips/cavium/octeon_ebt3000_cf.c +++ b/sys/mips/cavium/octeon_ebt3000_cf.c @@ -622,6 +622,8 @@ static void cf_identify (driver_t *drv, device_t parent) return; phys_base = cvmx_sysinfo_get()->compact_flash_common_base_addr; + if (phys_base == 0) + return; base_addr = cvmx_phys_to_ptr(phys_base); for (bus_region = 0; bus_region < 8; bus_region++)