Skip to contentSkip to conversation

w1: w1_therm: fix build warning in w1_seq_show()

PATCH New Yang Yingliang 1 participant 1 message May 18, 2021 W1 dallas's 1-wire bus

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 w1: w1_therm: fix build warning in w1_seq_show()

Fix the following build warning:

drivers/w1/slaves/w1_therm.c: In function ‘w1_seq_show’:
drivers/w1/slaves/w1_therm.c:2059:6: warning: variable ‘rv’ set but not used [-Wunused-but-set-variable]

    int rv;
        ^~
---
 drivers/w1/slaves/w1_therm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/w1/slaves/w1_therm.c +1 -2
index a284da567ff9..ca70c5f03206 100644
@@ -2056,7 +2056,6 @@ static ssize_t w1_seq_show(struct device *device,
 {
 	struct w1_slave *sl = dev_to_w1_slave(device);
 	ssize_t c = PAGE_SIZE;
-	int rv;
 	int i;
 	u8 ack;
 	u64 rn;
@@ -2084,7 +2083,7 @@ static ssize_t w1_seq_show(struct device *device,
 			goto error;
 
 		w1_write_8(sl->master, W1_42_COND_READ);
-		rv = w1_read_block(sl->master, (u8 *)&rn, 8);
+		w1_read_block(sl->master, (u8 *)&rn, 8);
 		reg_num = (struct w1_reg_num *) &rn;
 		if (reg_num->family == W1_42_FINISHED_BYTE)
 			break;
Signature · 1 line
2.25.1