From: Dan Carpenter <dan.carpenter@oracle.com>
To: Scott Branden <scott.branden@broadcom.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Olof Johansson <olof@lixom.net>,
Desmond Yan <desmond.yan@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] misc: bcm-vk: unlock on error in bcm_to_h_msg_dequeue()
Date: Mon, 01 Feb 2021 12:22:07 +0000 [thread overview]
Message-ID: <YBfyb+jU5lDUe+5g@mwanda> (raw)
Unlock before returning on this error path.
Fixes: 111d746bb476 ("misc: bcm-vk: add VK messaging support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/misc/bcm-vk/bcm_vk_msg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c
index eec90494777d..fc972e43258a 100644
--- a/drivers/misc/bcm-vk/bcm_vk_msg.c
+++ b/drivers/misc/bcm-vk/bcm_vk_msg.c
@@ -849,7 +849,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 */
--
2.29.2
next reply other threads:[~2021-02-01 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 12:22 Dan Carpenter [this message]
2021-02-01 17:31 ` [PATCH] misc: bcm-vk: unlock on error in bcm_to_h_msg_dequeue() Scott Branden
2021-02-01 18:31 ` Desmond Yan
2021-02-01 18:32 ` Desmond Yan
2021-02-01 22:49 ` Scott Branden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YBfyb+jU5lDUe+5g@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=desmond.yan@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=scott.branden@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox