w1: fix for loop in w1_f29_remove_slave()
commit58299449257566613f58dcfb757f0ba4a377987a
authorDan Carpenter <error27@gmail.com>
Thu, 25 Aug 2011 22:59:04 +0000 (25 15:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Aug 2011 23:25:33 +0000 (25 16:25 -0700)
tree785b783e2638ae5482a75d15ef4f4e2a2b9790cc
parent2df7a7d1cd07626dd235ca102830ebfc6c01a09e
w1: fix for loop in w1_f29_remove_slave()

The for loop was looking for i <= 0 instead of i >= 0 so this function
never did anything.  Also we started with i = NB_SYSFS_BIN_FILES instead
of "NB_SYSFS_BIN_FILES - 1" which is an off by one bug.

Reported-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jean-Franois Dagenais <dagenaisj@sonatest.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/w1/slaves/w1_ds2408.c