diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2013-08-15 17:04:42 +0300 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-09-02 21:26:16 -0700 |
commit | 2e02d653febff23de614dc8978c64fbaa2767d85 (patch) | |
tree | f64bfb424ec93a2d2c558e44d2612ec6ba169349 /drivers/infiniband | |
parent | 27ae2d1ea578dce73ab5368a6bf31c342004e709 (diff) |
IB/iser: Fix redundant pointer check in dealloc flow
This bug was discovered by Smatch static checker run by Dan Carpenter.
If in free_rx_descriptors(), rx_descs are not NULL then the iser
device is definately not NULL, so no need to check it before
dereferencing it.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_initiator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index bdc38f423ca2..5f01da99ad66 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -310,7 +310,7 @@ void iser_free_rx_descriptors(struct iser_conn *ib_conn) if (!ib_conn->rx_descs) goto free_login_buf; - if (device && device->iser_free_rdma_reg_res) + if (device->iser_free_rdma_reg_res) device->iser_free_rdma_reg_res(ib_conn); rx_desc = ib_conn->rx_descs; |