diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-02-01 15:22:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-03 17:57:57 +0300 |
commit | d7a4bfcac9a5f229aebfe307280e773b5f565443 (patch) | |
tree | f6d3e9fb4a8e7dca7cb24ac7ff22c4a92eb2d612 /drivers/misc/bcm-vk | |
parent | 930c922a987a02936000f15ea62988b7a39c27f5 (diff) | |
download | linux-d7a4bfcac9a5f229aebfe307280e773b5f565443.tar.xz |
misc: bcm-vk: unlock on error in bcm_to_h_msg_dequeue()
Unlock before returning on this error path.
Fixes: 111d746bb476 ("misc: bcm-vk: add VK messaging support")
Acked-by: Desmond Yan <desmond.yan@broadcom.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YBfyb+jU5lDUe+5g@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/bcm-vk')
-rw-r--r-- | drivers/misc/bcm-vk/bcm_vk_msg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c index a363e2e4f7bc..f40cf08a6192 100644 --- a/drivers/misc/bcm-vk/bcm_vk_msg.c +++ b/drivers/misc/bcm-vk/bcm_vk_msg.c @@ -855,7 +855,8 @@ s32 bcm_to_h_msg_dequeue(struct bcm_vk *vk) * that is fatal. */ dev_crit(dev, "Kernel mem allocation failure.\n"); - return -ENOMEM; + total = -ENOMEM; + goto idx_err; } /* flush rd pointer after a message is dequeued */ |