From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alison Schofield <alison.schofield@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Adam Manzanares <a.manzanares@samsung.com>,
linux-cxl@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] cxl/hdm: unlock on error in cxl_decoder_commit()
Date: Tue, 16 Aug 2022 17:55:51 +0300 [thread overview]
Message-ID: <Yvuv9wQrtXBy4Ddr@kili> (raw)
Unlock on this error path before returning.
Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/cxl/core/hdm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index d1d2caea5c62..873c07386064 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -605,6 +605,7 @@ static int cxl_decoder_commit(struct cxl_decoder *cxld)
rc = cxlsd_set_targets(cxlsd, &targets);
if (rc) {
+ up_read(&cxl_dpa_rwsem);
dev_dbg(&port->dev, "%s: target configuration error\n",
dev_name(&cxld->dev));
goto err;
--
2.35.1
next reply other threads:[~2022-08-16 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 14:55 Dan Carpenter [this message]
2022-08-16 20:56 ` [PATCH] cxl/hdm: unlock on error in cxl_decoder_commit() Dan Williams
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=Yvuv9wQrtXBy4Ddr@kili \
--to=dan.carpenter@oracle.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=vishal.l.verma@intel.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