public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] w1: unlock correct lock on error in w1_seq_show()
@ 2015-06-01  9:56 Dan Carpenter
  2015-06-02 12:12 ` David Fries
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2015-06-01  9:56 UTC (permalink / raw)
  To: Evgeniy Polyakov, Matt Campbell
  Cc: Greg Kroah-Hartman, David Fries, linux-kernel, kernel-janitors

Smatch complains that we don't unlock "master->mutex" on this error
path.  It looks like it is a typo and we unlock ->bus_mutext where
->mutex was intended.

Fixes: d9411e57dc7f ('w1: Add support for DS28EA00 sequence to w1-therm')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index 3351be6..79ecaf8 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -412,7 +412,7 @@ static ssize_t w1_seq_show(struct device *device,
 	c -= snprintf(buf + PAGE_SIZE - c, c, "%d\n", seq);
 	return PAGE_SIZE - c;
 error:
-	mutex_unlock(&sl->master->bus_mutex);
+	mutex_unlock(&sl->master->mutex);
 	return -EIO;
 }
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-06-11 23:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01  9:56 [patch 2/2] w1: unlock correct lock on error in w1_seq_show() Dan Carpenter
2015-06-02 12:12 ` David Fries
     [not found]   ` <CA+gYwTGSBAjSPyUSUwknOmm8SoFzHFdJmoYPVA9yN61aWO7sdA@mail.gmail.com>
2015-06-03  1:07     ` David Fries
2015-06-03  1:54       ` Matt Campbell
2015-06-03  2:39         ` David Fries
2015-06-04  9:04   ` [patch] [patch 2/2 v2] w1: use " Dan Carpenter
2015-06-11 15:31     ` Evgeniy Polyakov
2015-06-11 23:41       ` David Fries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox