diff options
Diffstat (limited to 'drivers/infiniband/core/mad.c')
-rw-r--r-- | drivers/infiniband/core/mad.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index dbcd285405ec..de922a04ca2d 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -742,9 +742,7 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv, | |||
742 | break; | 742 | break; |
743 | case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED: | 743 | case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED: |
744 | kmem_cache_free(ib_mad_cache, mad_priv); | 744 | kmem_cache_free(ib_mad_cache, mad_priv); |
745 | kfree(local); | 745 | break; |
746 | ret = 1; | ||
747 | goto out; | ||
748 | case IB_MAD_RESULT_SUCCESS: | 746 | case IB_MAD_RESULT_SUCCESS: |
749 | /* Treat like an incoming receive MAD */ | 747 | /* Treat like an incoming receive MAD */ |
750 | port_priv = ib_get_mad_port(mad_agent_priv->agent.device, | 748 | port_priv = ib_get_mad_port(mad_agent_priv->agent.device, |
@@ -755,10 +753,12 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv, | |||
755 | &mad_priv->mad.mad); | 753 | &mad_priv->mad.mad); |
756 | } | 754 | } |
757 | if (!port_priv || !recv_mad_agent) { | 755 | if (!port_priv || !recv_mad_agent) { |
756 | /* | ||
757 | * No receiving agent so drop packet and | ||
758 | * generate send completion. | ||
759 | */ | ||
758 | kmem_cache_free(ib_mad_cache, mad_priv); | 760 | kmem_cache_free(ib_mad_cache, mad_priv); |
759 | kfree(local); | 761 | break; |
760 | ret = 0; | ||
761 | goto out; | ||
762 | } | 762 | } |
763 | local->mad_priv = mad_priv; | 763 | local->mad_priv = mad_priv; |
764 | local->recv_mad_agent = recv_mad_agent; | 764 | local->recv_mad_agent = recv_mad_agent; |