aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-29 12:08:01 -0400
committerStephen Boyd <sboyd@kernel.org>2018-06-01 22:22:29 -0400
commitc0526a111afd564b79f28ce932c2bb101be42937 (patch)
tree8b464d158a3e67492ba7b6eb5c66bae6a6e1e214
parent8a26bbbb932021fd6ce8821ca8b2e6771b8ff7d2 (diff)
clk: bcm2835: 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. Cc: Michael Turquette <mturquette@baylibre.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: Stefan Wahren <stefan.wahren@i2se.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: bcm-kernel-feedback-list@broadcom.com Cc: Phil Elwell <phil@raspberrypi.org> Cc: Boris Brezillon <boris.brezillon@bootlin.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Danilo Krummrich <danilokrummrich@dk-develop.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r--drivers/clk/bcm/clk-bcm2835.c6
1 files 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,
398 struct debugfs_reg32 *regs, size_t nregs, 398 struct debugfs_reg32 *regs, size_t nregs,
399 struct dentry *dentry) 399 struct dentry *dentry)
400{ 400{
401 struct dentry *regdump;
402 struct debugfs_regset32 *regset; 401 struct debugfs_regset32 *regset;
403 402
404 regset = devm_kzalloc(cprman->dev, sizeof(*regset), GFP_KERNEL); 403 regset = devm_kzalloc(cprman->dev, sizeof(*regset), GFP_KERNEL);
@@ -409,10 +408,9 @@ static int bcm2835_debugfs_regset(struct bcm2835_cprman *cprman, u32 base,
409 regset->nregs = nregs; 408 regset->nregs = nregs;
410 regset->base = cprman->regs + base; 409 regset->base = cprman->regs + base;
411 410
412 regdump = debugfs_create_regset32("regdump", S_IRUGO, dentry, 411 debugfs_create_regset32("regdump", S_IRUGO, dentry, regset);
413 regset);
414 412
415 return regdump ? 0 : -ENOMEM; 413 return 0;
416} 414}
417 415
418struct bcm2835_pll_data { 416struct bcm2835_pll_data {