diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-08-25 07:27:44 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-09-03 20:31:26 +0200 |
commit | b3c0e38bdb52abd581da70d7048a173f8cf8d327 (patch) | |
tree | 6789a4a3adfdbe69661e7f785cb55ff002e2c712 /drivers/acpi/ec.c | |
parent | b90cb1053190353cc30f0fef0ef1f378ccc063c5 (diff) | |
download | linux-b3c0e38bdb52abd581da70d7048a173f8cf8d327.tar.gz linux-b3c0e38bdb52abd581da70d7048a173f8cf8d327.tar.bz2 linux-b3c0e38bdb52abd581da70d7048a173f8cf8d327.zip |
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>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c95e535035a0..9b42628cf21b 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); |