Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0c6d5c89 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

w1: use correct lock on error in w1_seq_show()



I noticed there was a problem here because Smatch complained:

	drivers/w1/slaves/w1_therm.c:416 w1_seq_show() warn:
	inconsistent returns 'mutex:&sl->master->mutex'.
	  Locked on:   line 416
	  Unlocked on: line 413

The problem is that we lock ->mutex but we unlock ->bus_mutex on error.
David Fries says that ->bus_mutex is correct and ->mutex is incorrect.

Fixes: d9411e57 ('w1: Add support for DS28EA00 sequence to w1-therm')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a14ef24b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment