diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_controlq.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_controlq.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c index 7c511f144ed6..c064416080e7 100644 --- a/drivers/net/ethernet/intel/ice/ice_controlq.c +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c | |||
@@ -597,10 +597,14 @@ static enum ice_status ice_init_check_adminq(struct ice_hw *hw) | |||
597 | return 0; | 597 | return 0; |
598 | 598 | ||
599 | init_ctrlq_free_rq: | 599 | init_ctrlq_free_rq: |
600 | ice_shutdown_rq(hw, cq); | 600 | if (cq->rq.head) { |
601 | ice_shutdown_sq(hw, cq); | 601 | ice_shutdown_rq(hw, cq); |
602 | mutex_destroy(&cq->sq_lock); | 602 | mutex_destroy(&cq->rq_lock); |
603 | mutex_destroy(&cq->rq_lock); | 603 | } |
604 | if (cq->sq.head) { | ||
605 | ice_shutdown_sq(hw, cq); | ||
606 | mutex_destroy(&cq->sq_lock); | ||
607 | } | ||
604 | return status; | 608 | return status; |
605 | } | 609 | } |
606 | 610 | ||
@@ -706,10 +710,14 @@ static void ice_shutdown_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type) | |||
706 | return; | 710 | return; |
707 | } | 711 | } |
708 | 712 | ||
709 | ice_shutdown_sq(hw, cq); | 713 | if (cq->sq.head) { |
710 | ice_shutdown_rq(hw, cq); | 714 | ice_shutdown_sq(hw, cq); |
711 | mutex_destroy(&cq->sq_lock); | 715 | mutex_destroy(&cq->sq_lock); |
712 | mutex_destroy(&cq->rq_lock); | 716 | } |
717 | if (cq->rq.head) { | ||
718 | ice_shutdown_rq(hw, cq); | ||
719 | mutex_destroy(&cq->rq_lock); | ||
720 | } | ||
713 | } | 721 | } |
714 | 722 | ||
715 | /** | 723 | /** |