lkml.org 
[lkml]   [2015]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] hpet: Delete an unnecessary check before unregister_sysctl_table()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Thu, 5 Nov 2015 21:32:42 +0100

    The unregister_sysctl_table() 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/char/hpet.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
    index 240b6cf..fe511e9 100644
    --- a/drivers/char/hpet.c
    +++ b/drivers/char/hpet.c
    @@ -1069,8 +1069,7 @@ static int __init hpet_init(void)

    result = acpi_bus_register_driver(&hpet_acpi_driver);
    if (result < 0) {
    - if (sysctl_header)
    - unregister_sysctl_table(sysctl_header);
    + unregister_sysctl_table(sysctl_header);
    misc_deregister(&hpet_misc);
    return result;
    }
    --
    2.6.2


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