OMAP3: Move try_unlock_memory() function to not duplicate code