linux/drivers/w1
David Fries 6b355b33a6 w1: fix w1_send_slave dropping a slave id
Previous logic,
if (avail > 8) {
	store slave;
	return;
}
send data; clear;

The logic error is, if there isn't space send the buffer and clear,
but the slave wasn't added to the now empty buffer loosing that slave
id.  It also should have been "if (avail >= 8)" because when it is 8,
there is space.

Instead, if there isn't space send and clear the buffer, then there is
always space for the slave id.

Signed-off-by: David Fries <David@Fries.net>
Cc: stable@vger.kernel.org
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 15:40:17 -08:00
..
masters drivers/w1/masters/w1-gpio.c: add strong pullup emulation 2014-01-23 16:37:04 -08:00
slaves w1: slaves: w1_ds2781: convert to use w1_family_ops.groups 2013-08-22 11:05:44 -07:00
Kconfig Kconfig: replace "--- help ---" with "---help---" 2012-05-07 15:01:22 +02:00
Makefile
w1_family.c drivers/w1: Add export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:32:00 -04:00
w1_family.h w1: add attribute groups to struct w1_family_ops 2013-08-22 11:05:42 -07:00
w1_int.c drivers/w1/masters/w1-gpio.c: add strong pullup emulation 2014-01-23 16:37:04 -08:00
w1_int.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1_io.c w1: Disable irqs during 1-wire bus operations, extend 1-wire reset pulse 2012-04-11 16:44:10 -07:00
w1_log.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1_netlink.c w1: fix w1_send_slave dropping a slave id 2014-02-07 15:40:17 -08:00
w1_netlink.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1.c drivers: w1: make w1_slave::flags long to avoid memory corruption 2013-11-13 12:09:35 +09:00
w1.h drivers: w1: make w1_slave::flags long to avoid memory corruption 2013-11-13 12:09:35 +09:00