X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=nct6775.c;h=6e21ffbd34d5372538d07acbde5971b84fa572cd;hb=34960d4d6e9c0cc22cd12f5a6d8dcbb5ebf975f0;hp=9a5d95599db3706799cd405825e54c641aa8bccc;hpb=ed2fbde486c66addf4e446bc7203a986b7b6dcde;p=groeck-nct6775 diff --git a/nct6775.c b/nct6775.c index 9a5d955..6e21ffb 100644 --- a/nct6775.c +++ b/nct6775.c @@ -3330,6 +3330,12 @@ static int __devinit nct6775_probe(struct platform_device *pdev) if (!src || (mask & (1 << src))) continue; + if (src >= data->temp_label_num || + !strlen(data->temp_label[src])) { + dev_info(dev, "Invalid temperature source %d\n", src); + continue; + } + mask |= 1 << src; /* Use fixed index for SYSTIN(1), CPUTIN(2), AUXTIN(3) */