From: SF Markus Elfring <elfring@users.sourceforge.net>
To: dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
David Airlie <airlied@linux.ie>, Inki Dae <inki.dae@samsung.com>,
Joonyoung Shim <jy0922.shim@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Kukjin Kim <kgene@kernel.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] drm/exynos/dsi: Use common error handling code in exynos_dsi_enable()
Date: Tue, 24 Oct 2017 08:49:52 +0000 [thread overview]
Message-ID: <9028478a-a00d-6fcd-0286-b8daefa8c912@users.sourceforge.net> (raw)
In-Reply-To: <7d4cdb43-432c-c67a-5d3f-c37bd604f539@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 24 Oct 2017 09:32:18 +0200
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 7904ffa9abfb..ba5fb49c5491 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1389,8 +1389,7 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
ret = drm_panel_prepare(dsi->panel);
if (ret < 0) {
dsi->state &= ~DSIM_STATE_ENABLED;
- pm_runtime_put_sync(dsi->dev);
- return;
+ goto put_sync;
}
exynos_dsi_set_display_mode(dsi);
@@ -1401,11 +1400,14 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
dsi->state &= ~DSIM_STATE_ENABLED;
exynos_dsi_set_display_enable(dsi, false);
drm_panel_unprepare(dsi->panel);
- pm_runtime_put_sync(dsi->dev);
- return;
+ goto put_sync;
}
dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE;
+ return;
+
+put_sync:
+ pm_runtime_put_sync(dsi->dev);
}
static void exynos_dsi_disable(struct drm_encoder *encoder)
--
2.14.2
next prev parent reply other threads:[~2017-10-24 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 8:48 [PATCH 0/3] GPU-DRM-Exynos: Fine-tuning for six function implementations SF Markus Elfring
2017-10-24 8:49 ` SF Markus Elfring [this message]
2017-10-24 8:51 ` [PATCH 1/3] drm/exynos/dsi: Use common error handling code in exynos_dsi_enable() Krzysztof Kozlowski
2017-10-24 9:08 ` SF Markus Elfring
2017-10-24 8:50 ` [PATCH 2/3] drm/exynos/gem: Use common error handling code in exynos_drm_gem_init() SF Markus Elfring
2017-10-24 8:52 ` [PATCH 3/3] drm/exynos: Fix typos in five comment lines SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9028478a-a00d-6fcd-0286-b8daefa8c912@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox