提交 60fc75bd 编写于 作者: G Geert Uytterhoeven 提交者: Simon Horman

ARM: shmobile: rcar-gen2: Fix error check in regulator quirk

On systems with two regulators, a bogus error message is printed on
success:

    i2c 6-0058: i2c error 2

While adding support for Stout, the number of messages to send was
made variable, but the corresponding return value check of
i2c_transfer() wasn't updated.

Fixes: ff938cd1 ("ARM: shmobile: stout: enable R-Car Gen2 regulator quirk")
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
上级 bf79cd63
......@@ -98,7 +98,7 @@ static int regulator_quirk_notify(struct notifier_block *nb,
dev_info(&client->dev, "clearing da9063/da9210 interrupts\n");
ret = i2c_transfer(client->adapter, da9xxx_msgs, len);
if (ret != ARRAY_SIZE(da9xxx_msgs))
if (ret != len)
dev_err(&client->dev, "i2c error %d\n", ret);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册