video: fbdev: omapfb: simplify the return expression of nec_8048_connect()
authorMinghao Chi <chi.minghao@zte.com.cn>
Fri, 29 Apr 2022 05:51:12 +0000 (05:51 +0000)
committerHelge Deller <deller@gmx.de>
Thu, 19 May 2022 09:17:42 +0000 (11:17 +0200)
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c

index be9910f..b407173 100644 (file)
@@ -117,16 +117,11 @@ static int nec_8048_connect(struct omap_dss_device *dssdev)
 {
        struct panel_drv_data *ddata = to_panel_data(dssdev);
        struct omap_dss_device *in = ddata->in;
-       int r;
 
        if (omapdss_device_is_connected(dssdev))
                return 0;
 
-       r = in->ops.dpi->connect(in, dssdev);
-       if (r)
-               return r;
-
-       return 0;
+       return in->ops.dpi->connect(in, dssdev);
 }
 
 static void nec_8048_disconnect(struct omap_dss_device *dssdev)