提交 b3c0e38b 编写于 作者: Y ye xingchen 提交者: Rafael J. Wysocki

ACPI: EC: Drop unneeded result variable from ec_write()

Return the acpi_ec_write() return value directly instead of storing it
in another redundant variable.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: Nye xingchen <ye.xingchen@zte.com.cn>
[ rjw: Subject and changelog edits ]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 b90cb105
...@@ -917,14 +917,10 @@ EXPORT_SYMBOL(ec_read); ...@@ -917,14 +917,10 @@ EXPORT_SYMBOL(ec_read);
int ec_write(u8 addr, u8 val) int ec_write(u8 addr, u8 val)
{ {
int err;
if (!first_ec) if (!first_ec)
return -ENODEV; return -ENODEV;
err = acpi_ec_write(first_ec, addr, val); return acpi_ec_write(first_ec, addr, val);
return err;
} }
EXPORT_SYMBOL(ec_write); EXPORT_SYMBOL(ec_write);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册