From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934464AbbGHOpl (ORCPT ); Wed, 8 Jul 2015 10:45:41 -0400 Received: from mga09.intel.com ([134.134.136.24]:11106 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934028AbbGHOpO (ORCPT ); Wed, 8 Jul 2015 10:45:14 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,431,1432623600"; d="scan'208";a="520839801" From: Andy Shevchenko To: "David E . Box" , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Andy Shevchenko Subject: [PATCH v2 2/5] x86/platform/iosf_mbi: check result for all calls of debugfs API Date: Wed, 8 Jul 2015 17:45:06 +0300 Message-Id: <1436366709-17683-3-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436366709-17683-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1436366709-17683-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch fixes a debugfs interface by checking the result code for each node. While here, replace IS_ERR_OR_NULL(x) by just !x since first one does the job for us when we create a folder. Signed-off-by: Andy Shevchenko --- arch/x86/platform/intel/iosf_mbi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/platform/intel/iosf_mbi.c b/arch/x86/platform/intel/iosf_mbi.c index 82f8d02..2362da9 100644 --- a/arch/x86/platform/intel/iosf_mbi.c +++ b/arch/x86/platform/intel/iosf_mbi.c @@ -240,17 +240,17 @@ static void iosf_sideband_debug_init(void) /* mdr */ d = debugfs_create_x32("mdr", 0660, iosf_dbg, &dbg_mdr); - if (IS_ERR_OR_NULL(d)) + if (!d) goto cleanup; /* mcrx */ - debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx); - if (IS_ERR_OR_NULL(d)) + d = debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx); + if (!d) goto cleanup; /* mcr - initiates mailbox tranaction */ - debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr, &iosf_mcr_fops); - if (IS_ERR_OR_NULL(d)) + d = debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr, &iosf_mcr_fops); + if (!d) goto cleanup; return; -- 2.1.4