From patchwork Sat Jun 28 09:44:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 4439361 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4CFD9BEEAA for ; Sat, 28 Jun 2014 09:46:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F6572038F for ; Sat, 28 Jun 2014 09:46:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 759012013D for ; Sat, 28 Jun 2014 09:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750923AbaF1JqH (ORCPT ); Sat, 28 Jun 2014 05:46:07 -0400 Received: from mailrelay002.isp.belgacom.be ([195.238.6.175]:54959 "EHLO mailrelay002.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750754AbaF1JqF (ORCPT ); Sat, 28 Jun 2014 05:46:05 -0400 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkUHAGyOrlNbsk2v/2dsb2JhbABagw2regUBAQEBAQEFAW0BmQKBCBd1hDEvI4EaN4hGAcUIF4VkiSEdhC0FhGMClXiLP4g8ggCBRDs Received: from 175.77-178-91.adsl-dyn.isp.belgacom.be (HELO linux-zvq9.site) ([91.178.77.175]) by relay.skynet.be with ESMTP; 28 Jun 2014 11:46:03 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Bjorn Helgaas , Ryan Desfosses , linux-pci@vger.kernel.org Subject: [PATCH 1/1] drivers/pci/hotplug/cpqphp_sysfs.c: remove unnecessary null test before debugfs_remove Date: Sat, 28 Jun 2014 11:44:43 +0200 Message-Id: <1403948683-10410-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.8.4.5 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix checkpatch warning: "WARNING: debugfs_remove(NULL) is safe this check is probably not required" Cc: Bjorn Helgaas Cc: Ryan Desfosses Cc: linux-pci@vger.kernel.org Signed-off-by: Fabian Frederick --- drivers/pci/hotplug/cpqphp_sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c index 4a392c4..d81648f 100644 --- a/drivers/pci/hotplug/cpqphp_sysfs.c +++ b/drivers/pci/hotplug/cpqphp_sysfs.c @@ -216,8 +216,7 @@ void cpqhp_create_debugfs_files(struct controller *ctrl) void cpqhp_remove_debugfs_files(struct controller *ctrl) { - if (ctrl->dentry) - debugfs_remove(ctrl->dentry); + debugfs_remove(ctrl->dentry); ctrl->dentry = NULL; }