From patchwork Tue May 29 16:08:01 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: 10436395 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 480F0602BF for ; Tue, 29 May 2018 16:08:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3881F28957 for ; Tue, 29 May 2018 16:08:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CEB52895A; Tue, 29 May 2018 16:08:39 +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 82FB028958 for ; Tue, 29 May 2018 16:08:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935207AbeE2QIi (ORCPT ); Tue, 29 May 2018 12:08:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934877AbeE2QIh (ORCPT ); Tue, 29 May 2018 12:08:37 -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 7C47420880; Tue, 29 May 2018 16:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527610117; bh=8z//HfEXlRY7KBInEk9dhj34d4mK/yhYg/ZVueuj7mI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rn7+nt0vLl3vvp8sHM3k9mwc7l6uIj5IemAP5APLJGAb/i8YwyvtG6UNi5bVqxT2s B+ouXAC5wPWyzHmPmaFUZXJTNlaBxMUxvJ/yCwmUsn4/M5md3xPszhYRBAbKimKDj7 z0Fvo2zYNwlvm9hmy1ELTkQRufXpOrhavciz91B8= From: Greg Kroah-Hartman To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, Greg Kroah-Hartman , Eric Anholt , Stefan Wahren , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Phil Elwell , Boris Brezillon , Danilo Krummrich Subject: [PATCH 2/5] clk: bcm2835: no need to check return value of debugfs_create functions Date: Tue, 29 May 2018 18:08:01 +0200 Message-Id: <20180529160804.1982-2-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180529160804.1982-1-gregkh@linuxfoundation.org> References: <20180529160804.1982-1-gregkh@linuxfoundation.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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: Michael Turquette Cc: Stephen Boyd Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Phil Elwell Cc: Boris Brezillon Cc: Greg Kroah-Hartman Cc: Danilo Krummrich Signed-off-by: Greg Kroah-Hartman Reviewed-by: Eric Anholt --- drivers/clk/bcm/clk-bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index fa0d5c8611a0..1329440af59f 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -398,7 +398,6 @@ static int bcm2835_debugfs_regset(struct bcm2835_cprman *cprman, u32 base, struct debugfs_reg32 *regs, size_t nregs, struct dentry *dentry) { - struct dentry *regdump; struct debugfs_regset32 *regset; regset = devm_kzalloc(cprman->dev, sizeof(*regset), GFP_KERNEL); @@ -409,10 +408,9 @@ static int bcm2835_debugfs_regset(struct bcm2835_cprman *cprman, u32 base, regset->nregs = nregs; regset->base = cprman->regs + base; - regdump = debugfs_create_regset32("regdump", S_IRUGO, dentry, - regset); + debugfs_create_regset32("regdump", S_IRUGO, dentry, regset); - return regdump ? 0 : -ENOMEM; + return 0; } struct bcm2835_pll_data {