[PATCH 09/12] IB/srp: Remove a superfluous check from srp_free_req_data()

Bart Van Assche
2015-04-30T09:01:03Z

All srp_free_req_data() callers guarantee that ch->target != NULL
hence remove the ch->target test from srp_free_req_data().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
---
drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 3727b90..a73eb1e5 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -853,7 +853,7 @@ static void srp_free_req_data(struct srp_target_port *target,
struct srp_request *req;
int i;

- if (!ch->target || !ch->req_ring)
+ if (!ch->req_ring)
return;

for (i = 0; i < target->req_ring_size; ++i) {
--
2.1.4