Commit bcee7673 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Stephen Boyd
Browse files

clk: davinci: no need to check return value of debugfs_create functions



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.

Acked-by: default avatarDavid Lechner <david@lechnology.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent c0526a11
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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;
}