diff options
author | Leon Romanovsky <leon@kernel.org> | 2016-11-03 10:44:24 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-03 13:12:52 -0500 |
commit | 93b80f29044639ce98baabd3431af9d78e9d1223 (patch) | |
tree | 1a77acab739ffbf416d73141406b2966d0bde9ef /drivers/infiniband/ulp | |
parent | 907610bfdf1a7f3d173a9593fde70f67d63476d1 (diff) |
IB/isert: Remove and fix debug prints after allocation failure
The prints after [k|v][m|z|c]alloc() functions are not needed,
because in case of failure, allocator will print their internal
error prints anyway.
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 6dd43f63238e..225cb8255563 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -184,7 +184,7 @@ isert_alloc_rx_descriptors(struct isert_conn *isert_conn) | |||
184 | isert_conn->rx_descs = kzalloc(ISERT_QP_MAX_RECV_DTOS * | 184 | isert_conn->rx_descs = kzalloc(ISERT_QP_MAX_RECV_DTOS * |
185 | sizeof(struct iser_rx_desc), GFP_KERNEL); | 185 | sizeof(struct iser_rx_desc), GFP_KERNEL); |
186 | if (!isert_conn->rx_descs) | 186 | if (!isert_conn->rx_descs) |
187 | goto fail; | 187 | return -ENOMEM; |
188 | 188 | ||
189 | rx_desc = isert_conn->rx_descs; | 189 | rx_desc = isert_conn->rx_descs; |
190 | 190 | ||
@@ -213,9 +213,7 @@ dma_map_fail: | |||
213 | } | 213 | } |
214 | kfree(isert_conn->rx_descs); | 214 | kfree(isert_conn->rx_descs); |
215 | isert_conn->rx_descs = NULL; | 215 | isert_conn->rx_descs = NULL; |
216 | fail: | ||
217 | isert_err("conn %p failed to allocate rx descriptors\n", isert_conn); | 216 | isert_err("conn %p failed to allocate rx descriptors\n", isert_conn); |
218 | |||
219 | return -ENOMEM; | 217 | return -ENOMEM; |
220 | } | 218 | } |
221 | 219 | ||
@@ -269,10 +267,8 @@ isert_alloc_comps(struct isert_device *device) | |||
269 | 267 | ||
270 | device->comps = kcalloc(device->comps_used, sizeof(struct isert_comp), | 268 | device->comps = kcalloc(device->comps_used, sizeof(struct isert_comp), |
271 | GFP_KERNEL); | 269 | GFP_KERNEL); |
272 | if (!device->comps) { | 270 | if (!device->comps) |
273 | isert_err("Unable to allocate completion contexts\n"); | ||
274 | return -ENOMEM; | 271 | return -ENOMEM; |
275 | } | ||
276 | 272 | ||
277 | max_cqe = min(ISER_MAX_CQ_LEN, device->ib_device->attrs.max_cqe); | 273 | max_cqe = min(ISER_MAX_CQ_LEN, device->ib_device->attrs.max_cqe); |
278 | 274 | ||
@@ -432,10 +428,8 @@ isert_alloc_login_buf(struct isert_conn *isert_conn, | |||
432 | 428 | ||
433 | isert_conn->login_req_buf = kzalloc(sizeof(*isert_conn->login_req_buf), | 429 | isert_conn->login_req_buf = kzalloc(sizeof(*isert_conn->login_req_buf), |
434 | GFP_KERNEL); | 430 | GFP_KERNEL); |
435 | if (!isert_conn->login_req_buf) { | 431 | if (!isert_conn->login_req_buf) |
436 | isert_err("Unable to allocate isert_conn->login_buf\n"); | ||
437 | return -ENOMEM; | 432 | return -ENOMEM; |
438 | } | ||
439 | 433 | ||
440 | isert_conn->login_req_dma = ib_dma_map_single(ib_dev, | 434 | isert_conn->login_req_dma = ib_dma_map_single(ib_dev, |
441 | isert_conn->login_req_buf, | 435 | isert_conn->login_req_buf, |
@@ -1276,11 +1270,8 @@ isert_handle_text_cmd(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd | |||
1276 | 1270 | ||
1277 | if (payload_length) { | 1271 | if (payload_length) { |
1278 | text_in = kzalloc(payload_length, GFP_KERNEL); | 1272 | text_in = kzalloc(payload_length, GFP_KERNEL); |
1279 | if (!text_in) { | 1273 | if (!text_in) |
1280 | isert_err("Unable to allocate text_in of payload_length: %u\n", | ||
1281 | payload_length); | ||
1282 | return -ENOMEM; | 1274 | return -ENOMEM; |
1283 | } | ||
1284 | } | 1275 | } |
1285 | cmd->text_in_ptr = text_in; | 1276 | cmd->text_in_ptr = text_in; |
1286 | 1277 | ||
@@ -2307,10 +2298,9 @@ isert_setup_np(struct iscsi_np *np, | |||
2307 | int ret; | 2298 | int ret; |
2308 | 2299 | ||
2309 | isert_np = kzalloc(sizeof(struct isert_np), GFP_KERNEL); | 2300 | isert_np = kzalloc(sizeof(struct isert_np), GFP_KERNEL); |
2310 | if (!isert_np) { | 2301 | if (!isert_np) |
2311 | isert_err("Unable to allocate struct isert_np\n"); | ||
2312 | return -ENOMEM; | 2302 | return -ENOMEM; |
2313 | } | 2303 | |
2314 | sema_init(&isert_np->sem, 0); | 2304 | sema_init(&isert_np->sem, 0); |
2315 | mutex_init(&isert_np->mutex); | 2305 | mutex_init(&isert_np->mutex); |
2316 | INIT_LIST_HEAD(&isert_np->accepted); | 2306 | INIT_LIST_HEAD(&isert_np->accepted); |
@@ -2651,7 +2641,6 @@ static int __init isert_init(void) | |||
2651 | WQ_UNBOUND | WQ_HIGHPRI, 0); | 2641 | WQ_UNBOUND | WQ_HIGHPRI, 0); |
2652 | if (!isert_comp_wq) { | 2642 | if (!isert_comp_wq) { |
2653 | isert_err("Unable to allocate isert_comp_wq\n"); | 2643 | isert_err("Unable to allocate isert_comp_wq\n"); |
2654 | ret = -ENOMEM; | ||
2655 | return -ENOMEM; | 2644 | return -ENOMEM; |
2656 | } | 2645 | } |
2657 | 2646 | ||