projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4bb429
)
regulator: vexpress: Use PTR_ERR_OR_ZERO() to simplify code
author
zhengbin
<zhengbin13@huawei.com>
Mon, 18 Nov 2019 10:59:22 +0000
(18:59 +0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 18 Nov 2019 12:58:24 +0000
(12:58 +0000)
Fixes coccicheck warning:
drivers/regulator/vexpress-regulator.c:78:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Link:
https://lore.kernel.org/r/1574074762-34629-1-git-send-email-zhengbin13@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/vexpress-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/vexpress-regulator.c
b/drivers/regulator/vexpress-regulator.c
index 1235f46e633eff2487286ffee82534eaf729b127..5d39663efcaad1d86fd4d83f9b0f3c2d12381d47 100644
(file)
--- a/
drivers/regulator/vexpress-regulator.c
+++ b/
drivers/regulator/vexpress-regulator.c
@@
-75,10
+75,7
@@
static int vexpress_regulator_probe(struct platform_device *pdev)
config.of_node = pdev->dev.of_node;
rdev = devm_regulator_register(&pdev->dev, desc, &config);
- if (IS_ERR(rdev))
- return PTR_ERR(rdev);
-
- return 0;
+ return PTR_ERR_OR_ZERO(rdev);
}
static const struct of_device_id vexpress_regulator_of_match[] = {