From: ye xingchen Date: Thu, 25 Aug 2022 07:27:44 +0000 (+0000) Subject: ACPI: EC: Drop unneeded result variable from ec_write() X-Git-Tag: baikal/mips/sdk6.1~4779^2~3^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=27af6715f33e08faccca3c77c665160ffcd03693;p=kernel.git 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 Signed-off-by: ye xingchen [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c95e535035a04..9b42628cf21b3 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -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);