diff mbox

[1/2] opensm/osm_sa_service_record.c: Remove useless if

Message ID 4DAD9BDB.9010608@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Hal Rosenstock April 19, 2011, 2:27 p.m. UTC
in sr_rcv_process_delete_method

Also, cosmetic formatting change

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---
 opensm/osm_sa_service_record.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Comments

Alex Netes April 21, 2011, 3:09 p.m. UTC | #1
On 10:27 Tue 19 Apr     , Hal Rosenstock wrote:
> 
> in sr_rcv_process_delete_method
> 
> Also, cosmetic formatting change
> 
> Signed-off-by: Hal Rosenstock <hal@mellanox.com>
> ---

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/opensm/osm_sa_service_record.c b/opensm/osm_sa_service_record.c
index 33c1f3b..72bcbdc 100644
--- a/opensm/osm_sa_service_record.c
+++ b/opensm/osm_sa_service_record.c
@@ -1,6 +1,6 @@ 
 /*
  * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
  *
  * This software is available to you under a choice of one of two
@@ -634,10 +634,9 @@  static void sr_rcv_process_delete_method(osm_sa_t * sa, IN osm_madw_t * p_madw)
 			"No records matched the RID\n");
 		osm_sa_send_error(sa, p_madw, IB_SA_MAD_STATUS_NO_RECORDS);
 		goto Exit;
-	} else {
-		osm_svcr_remove_from_db(sa->p_subn, sa->p_log, p_svcr);
 	}
 
+	osm_svcr_remove_from_db(sa->p_subn, sa->p_log, p_svcr);
 	cl_plock_release(sa->p_lock);
 
 	p_sr_item = malloc(sizeof(*p_sr_item));
@@ -654,8 +653,7 @@  static void sr_rcv_process_delete_method(osm_sa_t * sa, IN osm_madw_t * p_madw)
 
 	cl_qlist_insert_tail(&sr_list, &p_sr_item->list_item);
 
-	if (p_svcr)
-		osm_svcr_delete(p_svcr);
+	osm_svcr_delete(p_svcr);
 
 	sr_rcv_respond(sa, p_madw, &sr_list);