From 5ccee02dbe31a626a88fff714e75b956447a2c07 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 20 May 2017 12:53:41 -0700 Subject: [PATCH] Used bits in temp_mask start with 1 Used bits in temperature source registers, and thus temp_mask, start with 1. Valid sources in reg_temp_alternate[] start with 0. Add missing offset. Signed-off-by: Guenter Roeck --- nct6775.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nct6775.c b/nct6775.c index a8ae8da..5f448f3 100644 --- a/nct6775.c +++ b/nct6775.c @@ -4126,7 +4126,7 @@ static int nct6775_probe(struct platform_device *pdev) * is set. */ for (i = 0; i < 32; i++) { - if (!(data->temp_mask & BIT(i))) + if (!(data->temp_mask & BIT(i + 1))) continue; if (!reg_temp_alternate[i]) continue; -- 2.39.5