From: Nicolas Zea Date: Mon, 11 Feb 2008 00:41:03 +0000 (-0500) Subject: Bus: Only update port cache when there is an item to update it with. X-Git-Tag: m5_2.0_beta5~18^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c7eb211191055f72c6f157913cb384f47cf4334;p=gem5.git Bus: Only update port cache when there is an item to update it with. --HG-- extra : convert_revision : 84848fd48bb9e6693a0518c862364142b1969aa8 --- diff --git a/src/mem/bus.cc b/src/mem/bus.cc index 66b20703f..f47d48d0b 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -307,9 +307,10 @@ Bus::findPort(Addr addr) dest_id = checkPortCache(addr); if (dest_id == -1) { PortIter i = portMap.find(RangeSize(addr,1)); - if (i != portMap.end()) - dest_id = i->second; - updatePortCache(dest_id, i->first.start, i->first.end); + if (i != portMap.end()) { + dest_id = i->second; + updatePortCache(dest_id, i->first.start, i->first.end); + } } // Check if this matches the default range