projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba1bcaf
)
rtc: meson: simplify the return expression of meson_vrtc_probe
author
Liu Shixin
<liushixin2@huawei.com>
Sat, 19 Sep 2020 10:08:56 +0000
(18:08 +0800)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Tue, 29 Sep 2020 20:19:15 +0000
(22:19 +0200)
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Link:
https://lore.kernel.org/r/20200919100856.1639319-1-liushixin2@huawei.com
drivers/rtc/rtc-meson-vrtc.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-meson-vrtc.c
b/drivers/rtc/rtc-meson-vrtc.c
index 89e5ba0dae69fa40c2428648b3a14e1f4665f745..e6bd0808a092b59d0b6c4654463d1d3b7c7013b4 100644
(file)
--- a/
drivers/rtc/rtc-meson-vrtc.c
+++ b/
drivers/rtc/rtc-meson-vrtc.c
@@
-65,7
+65,6
@@
static const struct rtc_class_ops meson_vrtc_ops = {
static int meson_vrtc_probe(struct platform_device *pdev)
{
struct meson_vrtc_data *vrtc;
- int ret;
vrtc = devm_kzalloc(&pdev->dev, sizeof(*vrtc), GFP_KERNEL);
if (!vrtc)
@@
-84,11
+83,7
@@
static int meson_vrtc_probe(struct platform_device *pdev)
return PTR_ERR(vrtc->rtc);
vrtc->rtc->ops = &meson_vrtc_ops;
- ret = rtc_register_device(vrtc->rtc);
- if (ret)
- return ret;
-
- return 0;
+ return rtc_register_device(vrtc->rtc);
}
static int __maybe_unused meson_vrtc_suspend(struct device *dev)