From: Evgeniy Polyakov Date: Wed, 6 Feb 2008 09:38:07 +0000 (-0800) Subject: w1: remove unused and confusing variable. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=18a2354db7d7e43da08c0351263fd5b5fc20a38d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git w1: remove unused and confusing variable. Remvoe variable which actually is not used (except assigning it a value) and confusing break out of the family checking loop. Found by Harry Mason. Signed-off-by: Evgeniy Polyakov Cc: Harry J Mason Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 33e50310e9e0..7293c9b11f91 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -675,7 +675,6 @@ static void w1_slave_found(void *data, u64 rn) struct w1_slave *sl; struct list_head *ent; struct w1_reg_num *tmp; - int family_found = 0; struct w1_master *dev; u64 rn_le = cpu_to_le64(rn); @@ -698,9 +697,6 @@ static void w1_slave_found(void *data, u64 rn) sl->reg_num.crc == tmp->crc) { set_bit(W1_SLAVE_ACTIVE, (long *)&sl->flags); break; - } else if (sl->reg_num.family == tmp->family) { - family_found = 1; - break; } slave_count++;