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 <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>
1 parent b90cb10 commit b3c0e38

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

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)