lkml.org 
[lkml]   [2015]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 2/5] x86: pmc_atom: don't check for NULL twice
    Date
    debugfs_remove_recursive() is NULL-aware, thus, we may safely remove the check
    here. There is no need to assing NULL to variable since it will be not used
    anywhere.

    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Aubrey Li <aubrey.li@linux.intel.com>
    ---
    arch/x86/kernel/pmc_atom.c | 4 ----
    1 file changed, 4 deletions(-)

    diff --git a/arch/x86/kernel/pmc_atom.c b/arch/x86/kernel/pmc_atom.c
    index 8bb9a61..1dd6c62 100644
    --- a/arch/x86/kernel/pmc_atom.c
    +++ b/arch/x86/kernel/pmc_atom.c
    @@ -202,11 +202,7 @@ static const struct file_operations pmc_sleep_tmr_ops = {

    static void pmc_dbgfs_unregister(struct pmc_dev *pmc)
    {
    - if (!pmc->dbgfs_dir)
    - return;
    -
    debugfs_remove_recursive(pmc->dbgfs_dir);
    - pmc->dbgfs_dir = NULL;
    }

    static int pmc_dbgfs_register(struct pmc_dev *pmc, struct pci_dev *pdev)
    --
    2.1.4


    \
     
     \ /
      Last update: 2015-01-14 18:21    [W:3.239 / U:0.212 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site