Commit b3c0e38b authored by ye xingchen's avatar ye xingchen Committed by 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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b90cb105
......@@ -917,14 +917,10 @@ EXPORT_SYMBOL(ec_read);
int ec_write(u8 addr, u8 val)
{
int err;
if (!first_ec)
return -ENODEV;
err = acpi_ec_write(first_ec, addr, val);
return err;
return acpi_ec_write(first_ec, addr, val);
}
EXPORT_SYMBOL(ec_write);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment