Messages in this thread Patch in this message | | | Subject | [PATCH] ACPI-EC: Delete an unnecessary check before the function call "acpi_ec_delete_query" | From | SF Markus Elfring <> | Date | Sun, 15 Nov 2015 22:52:30 +0100 |
| |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Sun, 15 Nov 2015 22:42:27 +0100
The acpi_ec_delete_query() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index f61a7c8..b420fb4 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1103,7 +1103,7 @@ static int acpi_ec_query(struct acpi_ec *ec, u8 *data) } err_exit: - if (result && q) + if (result) acpi_ec_delete_query(q); if (data) *data = value; -- 2.6.2
| |