diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-19 12:08:56 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-09-29 22:19:15 +0200 |
commit | 9ce42e8e0323d39fad01f3d17c35dd16d91c4f46 (patch) | |
tree | 81f2f0767ac31883606fd7122f206a11e045355d /drivers/rtc/rtc-meson-vrtc.c | |
parent | rtc: rx8010: rename rx8010_init_client() to rx8010_init() (diff) | |
download | linux-9ce42e8e0323d39fad01f3d17c35dd16d91c4f46.tar.xz linux-9ce42e8e0323d39fad01f3d17c35dd16d91c4f46.zip |
rtc: meson: simplify the return expression of meson_vrtc_probe
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
Diffstat (limited to 'drivers/rtc/rtc-meson-vrtc.c')
-rw-r--r-- | drivers/rtc/rtc-meson-vrtc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-meson-vrtc.c b/drivers/rtc/rtc-meson-vrtc.c index 89e5ba0dae69..e6bd0808a092 100644 --- 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) |