File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
drivers/infiniband/hw/qedr Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -344,14 +344,18 @@ static int qedr_alloc_resources(struct qedr_dev *dev)
344
344
if (IS_IWARP (dev )) {
345
345
xa_init (& dev -> qps );
346
346
dev -> iwarp_wq = create_singlethread_workqueue ("qedr_iwarpq" );
347
+ if (!dev -> iwarp_wq ) {
348
+ rc = - ENOMEM ;
349
+ goto err1 ;
350
+ }
347
351
}
348
352
349
353
/* Allocate Status blocks for CNQ */
350
354
dev -> sb_array = kcalloc (dev -> num_cnq , sizeof (* dev -> sb_array ),
351
355
GFP_KERNEL );
352
356
if (!dev -> sb_array ) {
353
357
rc = - ENOMEM ;
354
- goto err1 ;
358
+ goto err_destroy_wq ;
355
359
}
356
360
357
361
dev -> cnq_array = kcalloc (dev -> num_cnq ,
@@ -402,6 +406,9 @@ static int qedr_alloc_resources(struct qedr_dev *dev)
402
406
kfree (dev -> cnq_array );
403
407
err2 :
404
408
kfree (dev -> sb_array );
409
+ err_destroy_wq :
410
+ if (IS_IWARP (dev ))
411
+ destroy_workqueue (dev -> iwarp_wq );
405
412
err1 :
406
413
kfree (dev -> sgid_tbl );
407
414
return rc ;
You can’t perform that action at this time.
0 commit comments