linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] fsi: sbefifo: Fix missing unlock on error in sbefifo_dump_ffdc()
@ 2018-07-13  0:50 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2018-07-13  0:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Joel Stanley, Eddie James
  Cc: Wei Yongjun, linux-kernel, kernel-janitors

Add the missing unlock before return from function sbefifo_dump_ffdc()
in the error handling case.

Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/fsi/fsi-sbefifo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
index 6b31cc24..35f2749 100644
--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -150,6 +150,7 @@ static void sbefifo_dump_ffdc(struct device *dev, const __be32 *ffdc,
 		u32 w0, w1, w2, i;
 		if (ffdc_sz < 3) {
 			dev_err(dev, "SBE invalid FFDC package size %zd\n", ffdc_sz);
+			mutex_unlock(&sbefifo_ffdc_mutex);
 			return;
 		}
 		w0 = be32_to_cpu(*(ffdc++));


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-13  0:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13  0:50 [PATCH -next] fsi: sbefifo: Fix missing unlock on error in sbefifo_dump_ffdc() Wei Yongjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).