Home page loop once, other pages loop through all
You could do it this way:

{% set blockLimit = entry.section.isHomepage() ? 1 : null %}

{% for block in memberships.memberships.limit(blockLimit) %}
  &lt;a href="{{ block.urlLocation }}" class="center" target="_blank"&gt;
    {% for asset in block.logo %}
      &lt;img src="{{ asset.url('memberships')}}" alt="{{ asset.title }}" /&gt;
    {% endfor %}
  &lt;/a&gt;
{% endfor %}


entry.section returns the SectionModel for the entry, and isHomepage() tells you whether that section is the homepage. Then you set your limit accordingly.