Skip to content

Commit

Permalink
octeon_ep: unlock the correct lock on error path
Browse files Browse the repository at this point in the history
The h and the f letters are swapped so it unlocks the wrong lock.

Fixes: 577f0d1 ("octeon_ep: add separate mailbox command and response queues")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/251aa2a2-913e-4868-aac9-0a90fc3eeeda@kili.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Mar 30, 2023
1 parent 615927f commit 765f360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ int octep_ctrl_mbox_send(struct octep_ctrl_mbox *mbox, struct octep_ctrl_mbox_ms
ci = readl(q->hw_cons);

if (octep_ctrl_mbox_circq_space(pi, ci, q->sz) < (msg->hdr.s.sz + mbox_hdr_sz)) {
mutex_unlock(&mbox->f2hq_lock);
mutex_unlock(&mbox->h2fq_lock);
return -EAGAIN;
}

Expand Down

0 comments on commit 765f360

Please sign in to comment.