omapfb: connector-hdmi: simplify the return expression of hdmic_connect
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:10:51 +0000 (21:10 +0800)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 16 Oct 2020 21:16:28 +0000 (23:16 +0200)
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> # dropped gpio-cs5535.c changes
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131051.92661-1-miaoqinglang@huawei.com
drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c

index 49551af..670b9c6 100644 (file)
@@ -50,18 +50,13 @@ static int hdmic_connect(struct omap_dss_device *dssdev)
 {
        struct panel_drv_data *ddata = to_panel_data(dssdev);
        struct omap_dss_device *in = ddata->in;
-       int r;
 
        dev_dbg(ddata->dev, "connect\n");
 
        if (omapdss_device_is_connected(dssdev))
                return 0;
 
-       r = in->ops.hdmi->connect(in, dssdev);
-       if (r)
-               return r;
-
-       return 0;
+       return in->ops.hdmi->connect(in, dssdev);
 }
 
 static void hdmic_disconnect(struct omap_dss_device *dssdev)