From: Liu Shixin Date: Tue, 15 Sep 2020 03:26:27 +0000 (+0800) Subject: omapfb: connector-dvi: simplify the return expression of dvic_connect() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7604caa1f09911a290fcfa1f57ff2e573af0e887;p=linux.git omapfb: connector-dvi: simplify the return expression of dvic_connect() Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200915032627.1772517-1-liushixin2@huawei.com --- diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c index b4a1aefff7661..2fa436475b406 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c @@ -51,16 +51,11 @@ static int dvic_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.dvi->connect(in, dssdev); - if (r) - return r; - - return 0; + return in->ops.dvi->connect(in, dssdev); } static void dvic_disconnect(struct omap_dss_device *dssdev)