Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7530997imu; Tue, 22 Jan 2019 07:29:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN4WcAaE52kv4BahUvkb1bTI76yb8G1Ve0nhYE7RZMrxy87lhqB2WWwT1AbDyKzR1kXwL5G3 X-Received: by 2002:a62:11c7:: with SMTP id 68mr33709903pfr.21.1548170952221; Tue, 22 Jan 2019 07:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548170952; cv=none; d=google.com; s=arc-20160816; b=dl94OaQC09W7qw7M1XQKkqHewBwO9ScaDUqxmzW3R5WiDf43VcX0B/GfS7Q5qdLkuk zu1okZREZ6o+GNQ2pbH5gOc5qIZJVOIMKthaDEs7l28uUtRr9sxebjAS/MB1QyEuEa43 mJ/ZwrL4bVf8XARalE4UXJ6SjD8y37R2yeX7IOcpvD60qqYYX4IHcFEXPSuLu9MWy+kl Nkf+i5jtk1T4E/NXPKIl3nBWJYNgbdE5s3PnGoUI+aAHHhz1tggr1tkqTyTIUi8vit4e jmZ6MgBFpe7krBqHtb/jANDeteEgWnzYZVCFzWtm+sdGsbYw9tFx95wvkYxvITsy6nMM b9GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xRZmb8rhYcEZA1zuRLp1gOqw+x1SAS5TGcyfAoEwboM=; b=Z4AcEsfEpdp89QdGH0NCrZbxYIwZKFzVSwaTPSWdo0ylLvei+bEqyvVPxUvVGAV5qO R+DkwHvRMAsyNDRYTl26D5SGSjr8UHFYp7646+gKFRcfuexJz3xsIzdQN13eyry6P2BX m5qBkPZ1W+jsJ3Wg5yvZx5UWvTax+/KvRMLtEuQnrPUdcuwL+kJrSYwN5/j434dPTQ2Y s9iXAMxaCKZ3RP6i15qEQH0vAH/YxoyO9V4HHyc19bt9AE8t3xBaCXsTOzkZBgRNoe7f n5v7RmPjB3fsSt2Rm2p4WloDJZFOXeoEL1hSi/g79GdW3svphhLGI1CwgpaKgp7uVS8K 92eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TZVkhibB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc17si17132254plb.265.2019.01.22.07.28.56; Tue, 22 Jan 2019 07:29:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TZVkhibB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730113AbfAVP07 (ORCPT + 99 others); Tue, 22 Jan 2019 10:26:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:35918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729035AbfAVPXK (ORCPT ); Tue, 22 Jan 2019 10:23:10 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6AAAD217D4; Tue, 22 Jan 2019 15:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548170589; bh=YdMOG5hIPebuBTE0TS4QbtMeuiflJa1UNYVFoBVxNu8=; h=From:To:Cc:Subject:Date:From; b=TZVkhibBwwG/kEyrjpMV5y/sO8E2LkbFUYYdDy0RKB7KYNXOoIoXqtgwySZM0t+nE UOv10OBsZVwklEumxSS5JNmGgI2b/FZJaSnqKzGhXMhSMvlHgqAzgOV6yabv8dJemB EMS8dpgN0jDxuKbZUhGFnt4fXBIEKu4oU2JBbtWU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Ed L. Cashin" , Jens Axboe , linux-block@vger.kernel.org Subject: [PATCH] block: aoe: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 16:21:04 +0100 Message-Id: <20190122152151.16139-5-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "Ed L. Cashin" Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/block/aoe/aoeblk.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index e2c6aae2d636..b602646bfa04 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -207,14 +207,7 @@ aoedisk_add_debugfs(struct aoedev *d) else p++; BUG_ON(*p == '\0'); - entry = debugfs_create_file(p, 0444, aoe_debugfs_dir, d, - &aoe_debugfs_fops); - if (IS_ERR_OR_NULL(entry)) { - pr_info("aoe: cannot create debugfs file for %s\n", - d->gd->disk_name); - return; - } - BUG_ON(d->debugfs); + debugfs_create_file(p, 0444, aoe_debugfs_dir, d, &aoe_debugfs_fops); d->debugfs = entry; } void @@ -472,10 +465,6 @@ aoeblk_init(void) if (buf_pool_cache == NULL) return -ENOMEM; aoe_debugfs_dir = debugfs_create_dir("aoe", NULL); - if (IS_ERR_OR_NULL(aoe_debugfs_dir)) { - pr_info("aoe: cannot create debugfs directory\n"); - aoe_debugfs_dir = NULL; - } return 0; } -- 2.20.1