lkml.org 
[lkml]   [2015]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
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
    Date
    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


    \
     
     \ /
      Last update: 2015-11-15 23:01    [W:4.220 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site