Skip to content

Commit

Permalink
ACPI: EC: Drop unneeded result variable from ec_write()
Browse files Browse the repository at this point in the history
Return the acpi_ec_write() return value directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
ye xingchen authored and Rafael J. Wysocki committed Sep 3, 2022
1 parent b90cb10 commit b3c0e38
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b3c0e38

Please sign in to comment.