[-next] rtc: meson: simplify the return expression of meson_vrtc_probe
diff mbox series

Message ID 20200919100856.1639319-1-liushixin2@huawei.com
State In Next
Commit 9ce42e8e0323d39fad01f3d17c35dd16d91c4f46
Headers show
Series
  • [-next] rtc: meson: simplify the return expression of meson_vrtc_probe
Related show

Commit Message

Liu Shixin Sept. 19, 2020, 10:08 a.m. UTC
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/rtc/rtc-meson-vrtc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Kevin Hilman Sept. 21, 2020, 3:04 p.m. UTC | #1
Liu Shixin <liushixin2@huawei.com> writes:

> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>
Alexandre Belloni Sept. 29, 2020, 8:19 p.m. UTC | #2
On Sat, 19 Sep 2020 18:08:56 +0800, Liu Shixin wrote:
> Simplify the return expression.

Applied, thanks!

[1/1] rtc: meson: simplify the return expression of meson_vrtc_probe
      commit: 9ce42e8e0323d39fad01f3d17c35dd16d91c4f46

Best regards,

Patch
diff mbox series

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)