Skip to content

Commit b3c0e38

Browse files
ye xingchenrafaeljw
authored andcommitted
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: Zeal Robot <[email protected]> Signed-off-by: ye xingchen <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b90cb10 commit b3c0e38

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/acpi/ec.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -917,14 +917,10 @@ EXPORT_SYMBOL(ec_read);
917917

918918
int ec_write(u8 addr, u8 val)
919919
{
920-
int err;
921-
922920
if (!first_ec)
923921
return -ENODEV;
924922

925-
err = acpi_ec_write(first_ec, addr, val);
926-
927-
return err;
923+
return acpi_ec_write(first_ec, addr, val);
928924
}
929925
EXPORT_SYMBOL(ec_write);
930926

0 commit comments

Comments
 (0)