提交 4a91c45e 编写于 作者: D Dan Carpenter 提交者: Jacek Anaszewski

leds: tca6507: silence an uninitialized variable warning

If choose_times() returns -EINVAL that means "c1" and "c2" haven't been
initialized.  I've added a check for that.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
上级 fea728c0
......@@ -327,6 +327,8 @@ static void set_times(struct tca6507_chip *tca, int bank)
int result;
result = choose_times(tca->bank[bank].ontime, &c1, &c2);
if (result < 0)
return;
dev_dbg(&tca->client->dev,
"Chose on times %d(%d) %d(%d) for %dms\n",
c1, time_codes[c1],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册