summaryrefslogtreecommitdiff
path: root/drivers/w1
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-05-18 13:04:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-21 14:51:03 +0200
commitc6fa1a96db26b22cdfb2055d8b1a79e8c40b1040 (patch)
treeb8d5f397eecd808ccd1eb731076b382fa7901864 /drivers/w1
parent6a072b2e3722f39c148c2dea35f2485777b3aee5 (diff)
downloadlinux-rpi-c6fa1a96db26b22cdfb2055d8b1a79e8c40b1040.tar.gz
linux-rpi-c6fa1a96db26b22cdfb2055d8b1a79e8c40b1040.tar.bz2
linux-rpi-c6fa1a96db26b22cdfb2055d8b1a79e8c40b1040.zip
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; ^~ Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210518050415.615783-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/slaves/w1_therm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index a284da567ff9..ca70c5f03206 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -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;