From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753873AbbBRRNf (ORCPT ); Wed, 18 Feb 2015 12:13:35 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39306 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752519AbbBRRNd (ORCPT ); Wed, 18 Feb 2015 12:13:33 -0500 Date: Wed, 18 Feb 2015 09:12:48 -0800 From: tip-bot for Markus Elfring Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, acme@kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, elfring@users.sourceforge.net, tglx@linutronix.de Reply-To: tglx@linutronix.de, elfring@users.sourceforge.net, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, acme@kernel.org, torvalds@linux-foundation.org In-Reply-To: <54D0B59C.2060106@users.sourceforge.net> References: <54D0B59C.2060106@users.sourceforge.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf/x86/intel/uncore: Delete an unnecessary check before pci_dev_put() call Git-Commit-ID: 8e57c586c6a8333c266a6cf76d50e110f2954558 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 8e57c586c6a8333c266a6cf76d50e110f2954558 Gitweb: http://git.kernel.org/tip/8e57c586c6a8333c266a6cf76d50e110f2954558 Author: Markus Elfring AuthorDate: Tue, 3 Feb 2015 12:40:54 +0100 Committer: Ingo Molnar CommitDate: Wed, 18 Feb 2015 17:01:42 +0100 perf/x86/intel/uncore: Delete an unnecessary check before pci_dev_put() call 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 Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: H. Peter Anvin Cc: Linus Torvalds Link: http://lkml.kernel.org/r/54D0B59C.2060106@users.sourceforge.net Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c index 21af6149e..12d9548 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c @@ -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; }