Moved op.commit() call where it is actually needed: only if there
is a change to the database.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
index 65c7ec5..904a351 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
@@ -232,8 +232,8 @@
 	        	log.info("SwitchStorage:updatePort dpid:{} port:{}", dpid, portNum);
 	        	if (p != null) {
 	        		setPortStateImpl(p, state, desc);
+				op.commit();
 	        	}
-	        	op.commit();
         		success = true;
 	        } else {
 	    		log.error("SwitchStorage:updatePort dpid:{} port:{} : failed switch does not exist", dpid, portNum);