]> git.karo-electronics.de Git - linux-beck.git/commitdiff
perf/x86/intel/uncore: Delete an unnecessary check before pci_dev_put() call
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 3 Feb 2015 11:40:54 +0000 (12:40 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 18 Feb 2015 16:01:42 +0000 (17:01 +0100)
The pci_dev_put() 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>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/54D0B59C.2060106@users.sourceforge.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c

index 21af6149edf2e79dd462a7e8f4994c8fd201fa0f..12d9548457e7195a8a36b458e374cab9cabe5e07 100644 (file)
@@ -1132,8 +1132,7 @@ static int snbep_pci2phy_map_init(int devid)
                }
        }
 
-       if (ubox_dev)
-               pci_dev_put(ubox_dev);
+       pci_dev_put(ubox_dev);
 
        return err ? pcibios_err_to_errno(err) : 0;
 }