lkml.org 
[lkml]   [2014]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/1] s390/pci: Deletion of unnecessary checks before the function call "debug_unregister"
    On Sat, 22 Nov 2014, SF Markus Elfring wrote:

    > From: Markus Elfring <elfring@users.sourceforge.net>
    > Date: Sat, 22 Nov 2014 15:00:55 +0100
    >
    > The debug_unregister() function performs also input parameter validation.
    > 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>
    > ---
    > arch/s390/pci/pci_debug.c | 6 ++----
    > 1 file changed, 2 insertions(+), 4 deletions(-)
    >
    > diff --git a/arch/s390/pci/pci_debug.c b/arch/s390/pci/pci_debug.c
    > index eec598c..18403a7 100644
    > --- a/arch/s390/pci/pci_debug.c
    > +++ b/arch/s390/pci/pci_debug.c
    > @@ -158,10 +158,8 @@ int __init zpci_debug_init(void)
    >
    > void zpci_debug_exit(void)
    > {
    > - if (pci_debug_msg_id)
    > - debug_unregister(pci_debug_msg_id);
    > - if (pci_debug_err_id)
    > - debug_unregister(pci_debug_err_id);
    > + debug_unregister(pci_debug_msg_id);
    > + debug_unregister(pci_debug_err_id);
    >
    > debugfs_remove(debugfs_root);
    > }

    Applied.

    Thanks,
    Sebastian



    \
     
     \ /
      Last update: 2014-11-24 20:41    [W:4.027 / U:0.772 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site