From patchwork Tue May 29 16:08:02 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: 10436397 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 A724160327 for ; Tue, 29 May 2018 16:08:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9604C28957 for ; Tue, 29 May 2018 16:08:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AC8028969; Tue, 29 May 2018 16:08:43 +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 61BE428957 for ; Tue, 29 May 2018 16:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934877AbeE2QIm (ORCPT ); Tue, 29 May 2018 12:08:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:47320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935324AbeE2QIl (ORCPT ); Tue, 29 May 2018 12:08:41 -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 B01B120899; Tue, 29 May 2018 16:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527610120; bh=kl03calGGdr8Z/3GNC2mgci4NGIX4j7XjFwt4NbTdNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eGhlec+O/ifuOnL0pFNQLosYdxiRyggjzuJXmjBkQXmh9anZnN4oxjlGbMS8llRTk olcqKuO5f75V21/mio3kifYPCp+tVtyzRRjbqfUF6lLX++cs6EYCCdYP4pJbfSOa0c v+KlcuALMKAI8nsNE1sjdTGBZfcogGX3F3HHVX1o= From: Greg Kroah-Hartman To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, Greg Kroah-Hartman , David Lechner , Sekhar Nori Subject: [PATCH 3/5] clk: davinci: no need to check return value of debugfs_create functions Date: Tue, 29 May 2018 18:08:02 +0200 Message-Id: <20180529160804.1982-3-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: David Lechner Cc: Sekhar Nori Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Greg Kroah-Hartman Acked-by: David Lechner --- drivers/clk/davinci/pll.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c index 23a24c944f1d..bb9594703d4a 100644 --- a/drivers/clk/davinci/pll.c +++ b/drivers/clk/davinci/pll.c @@ -878,7 +878,6 @@ static int davinci_pll_debug_init(struct clk_hw *hw, struct dentry *dentry) { struct davinci_pll_clk *pll = to_davinci_pll_clk(hw); struct debugfs_regset32 *regset; - struct dentry *d; regset = kzalloc(sizeof(*regset), GFP_KERNEL); if (!regset) @@ -888,11 +887,7 @@ static int davinci_pll_debug_init(struct clk_hw *hw, struct dentry *dentry) regset->nregs = ARRAY_SIZE(davinci_pll_regs); regset->base = pll->base; - d = debugfs_create_regset32("registers", 0400, dentry, regset); - if (IS_ERR(d)) { - kfree(regset); - return PTR_ERR(d); - } + debugfs_create_regset32("registers", 0400, dentry, regset); return 0; }