diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-29 18:08:02 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-06-01 19:22:56 -0700 |
commit | bcee76731ca464c2e26b2ea017284bb4f9bc21f3 (patch) | |
tree | 1851a54c18b36b968b95b1561bd6223242ef370c /drivers/clk/davinci | |
parent | c0526a111afd564b79f28ce932c2bb101be42937 (diff) | |
download | blackbird-op-linux-bcee76731ca464c2e26b2ea017284bb4f9bc21f3.tar.gz blackbird-op-linux-bcee76731ca464c2e26b2ea017284bb4f9bc21f3.zip |
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: David Lechner <david@lechnology.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/davinci')
-rw-r--r-- | drivers/clk/davinci/pll.c | 7 |
1 files changed, 1 insertions, 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; } |