From patchwork Tue May 29 15:30:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10436265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B913602BF for ; Tue, 29 May 2018 15:32:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFE9328782 for ; Tue, 29 May 2018 15:32:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4BDE28889; Tue, 29 May 2018 15:32:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F9082889C for ; Tue, 29 May 2018 15:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935569AbeE2Pc1 (ORCPT ); Tue, 29 May 2018 11:32:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:40110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935207AbeE2Pc0 (ORCPT ); Tue, 29 May 2018 11:32:26 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 77A62208A2; Tue, 29 May 2018 15:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527607946; bh=AfYJxsGaUTQUfTQP9a6UU1EbPwab/ZxAzJNavuzs+mE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O2IHB/cNAwOZO+RH2QKJnwEKzjiKhjKlrevhn53FDSY/Z+UFK+1f1f2xsde8osqUq sh6F/POnckYynlp5HFcnMIPe5y7DP6PmAHAYD4cXRuGHXHYCToHUeVyGbcRaw+avJ1 i8Unl68xVhlE/0Kjv5GrNrbqpqpfb2C/2lMlnSCA= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman , Chunfeng Yun Subject: [PATCH 04/22] USB: mtu3: no need to check return value of debugfs_create_dir() Date: Tue, 29 May 2018 17:30:49 +0200 Message-Id: <20180529153107.12791-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180529153107.12791-1-gregkh@linuxfoundation.org> References: <20180529153107.12791-1-gregkh@linuxfoundation.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman --- drivers/usb/mtu3/mtu3_dr.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c index 8c3bbf732bc4..ac60e9c8564e 100644 --- a/drivers/usb/mtu3/mtu3_dr.c +++ b/drivers/usb/mtu3/mtu3_dr.c @@ -378,10 +378,6 @@ static void ssusb_debugfs_init(struct ssusb_mtk *ssusb) struct dentry *root; root = debugfs_create_dir(dev_name(ssusb->dev), usb_debug_root); - if (!root) { - dev_err(ssusb->dev, "create debugfs root failed\n"); - return; - } ssusb->dbgfs_root = root; debugfs_create_file("mode", 0644, root, ssusb, &ssusb_mode_fops);