From patchwork Tue Jan 22 15:14:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10775695 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5F2A1399 for ; Tue, 22 Jan 2019 15:15:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B596D28505 for ; Tue, 22 Jan 2019 15:15:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9FB8293B7; Tue, 22 Jan 2019 15:15:13 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 4B77C28505 for ; Tue, 22 Jan 2019 15:15:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729060AbfAVPOm (ORCPT ); Tue, 22 Jan 2019 10:14:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:54200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729052AbfAVPOm (ORCPT ); Tue, 22 Jan 2019 10:14:42 -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 D9BBF20879; Tue, 22 Jan 2019 15:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548170081; bh=OcCJCJe5ytmFwd4tSUjrcn1s8QsLE07MJEyeEBuLv1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yq4lADgYHa7g0/RLh8qYkIXE54BK6+kPTUh38UBzYhD69b9HkHynSIYOY1SDSq57U iiMp59vLlzaSan2hsleZ7hFCaBdDYfOJSdytkD6LrPicU1BWtP42vIzmj+KMVemmXM T0NvZCYn6pHhDhqLuIqHm8QbCOo9RtwLhLD+5UlE= From: Greg Kroah-Hartman To: Herbert Xu , David Miller Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Greg Kroah-Hartman , Jesper Nilsson , Lars Persson , linux-arm-kernel@axis.com Subject: [PATCH 3/7] crypto: axis: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 16:14:18 +0100 Message-Id: <20190122151422.14204-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122151422.14204-1-gregkh@linuxfoundation.org> References: <20190122151422.14204-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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: Jesper Nilsson Cc: Lars Persson Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-arm-kernel@axis.com Cc: linux-crypto@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Acked-by: Lars Persson --- drivers/crypto/axis/artpec6_crypto.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index f3442c2bdbdc..1a1858cea979 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -2984,12 +2984,6 @@ static void artpec6_crypto_init_debugfs(void) { dbgfs_root = debugfs_create_dir("artpec6_crypto", NULL); - if (!dbgfs_root || IS_ERR(dbgfs_root)) { - dbgfs_root = NULL; - pr_err("%s: Could not initialise debugfs!\n", MODULE_NAME); - return; - } - #ifdef CONFIG_FAULT_INJECTION fault_create_debugfs_attr("fail_status_read", dbgfs_root, &artpec6_crypto_fail_status_read); @@ -3001,9 +2995,6 @@ static void artpec6_crypto_init_debugfs(void) static void artpec6_crypto_free_debugfs(void) { - if (!dbgfs_root) - return; - debugfs_remove_recursive(dbgfs_root); dbgfs_root = NULL; }