diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/mad.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 3d8175e5f054..41d6b4017acb 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -508,8 +508,7 @@ static void unregister_mad_agent(struct ib_mad_agent_private *mad_agent_priv) | |||
508 | wait_event(mad_agent_priv->wait, | 508 | wait_event(mad_agent_priv->wait, |
509 | !atomic_read(&mad_agent_priv->refcount)); | 509 | !atomic_read(&mad_agent_priv->refcount)); |
510 | 510 | ||
511 | if (mad_agent_priv->reg_req) | 511 | kfree(mad_agent_priv->reg_req); |
512 | kfree(mad_agent_priv->reg_req); | ||
513 | ib_dereg_mr(mad_agent_priv->agent.mr); | 512 | ib_dereg_mr(mad_agent_priv->agent.mr); |
514 | kfree(mad_agent_priv); | 513 | kfree(mad_agent_priv); |
515 | } | 514 | } |
@@ -2500,8 +2499,7 @@ error: | |||
2500 | static void destroy_mad_qp(struct ib_mad_qp_info *qp_info) | 2499 | static void destroy_mad_qp(struct ib_mad_qp_info *qp_info) |
2501 | { | 2500 | { |
2502 | ib_destroy_qp(qp_info->qp); | 2501 | ib_destroy_qp(qp_info->qp); |
2503 | if (qp_info->snoop_table) | 2502 | kfree(qp_info->snoop_table); |
2504 | kfree(qp_info->snoop_table); | ||
2505 | } | 2503 | } |
2506 | 2504 | ||
2507 | /* | 2505 | /* |