0
0
mirror of https://mirrors.bfsu.edu.cn/git/linux.git synced 2024-12-16 23:45:31 +08:00
linux/drivers/w1/slaves
Dan Carpenter 0c6d5c89a1 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: d9411e57dc ('w1: Add support for DS28EA00 sequence to w1-therm')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 16:58:33 -07:00
..
Kconfig w1: select crc16 library for ds2406 2014-06-23 12:38:08 -04:00
Makefile w1: new w1_ds2406 driver 2014-06-19 17:45:14 -07:00
w1_bq27000.c w1: support auto-load of w1_bq27000 module. 2014-11-26 19:09:02 -08:00
w1_ds28e04.c w1: slaves: w1_ds28e04: convert to use w1_family_ops.groups 2013-08-22 11:05:43 -07:00
w1_ds2406.c w1: new w1_ds2406 driver 2014-06-19 17:45:14 -07:00
w1_ds2408.c w1: slaves: w1_ds2408: convert to use w1_family_ops.groups 2013-08-22 11:05:42 -07:00
w1_ds2413.c w1: slaves: w1_ds2413.c: convert to use w1_family_ops.groups 2013-08-22 11:05:43 -07:00
w1_ds2423.c w1: slaves: w1_ds2423: convert to use w1_family_ops.groups 2013-08-22 11:05:43 -07:00
w1_ds2431.c w1: slaves: w1_ds2431: convert to use w1_family_ops.groups 2013-08-22 11:05:43 -07:00
w1_ds2433.c w1: slaves: w1_ds2433: convert to use w1_family_ops.groups 2013-08-22 11:05:43 -07:00
w1_ds2760.c w1/slaves: use pr_* instead of printk 2014-06-19 17:46:51 -07:00
w1_ds2760.h w1: ds2760_battery: add support for sleep mode feature 2009-06-08 23:25:17 +04:00
w1_ds2780.c w1: slaves: w1_ds2780: convert to use w1_family_ops.groups 2013-08-22 11:05:43 -07:00
w1_ds2780.h W1: split master mutex to avoid deadlocks. 2012-06-13 16:38:40 -07:00
w1_ds2781.c w1: slaves: w1_ds2781: convert to use w1_family_ops.groups 2013-08-22 11:05:44 -07:00
w1_ds2781.h W1: split master mutex to avoid deadlocks. 2012-06-13 16:38:40 -07:00
w1_smem.c w1: add family based automatic module loading 2013-06-03 14:09:14 -07:00
w1_therm.c w1: use correct lock on error in w1_seq_show() 2015-06-12 16:58:33 -07:00