mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm: tegra: Check return value of drm_vblank_get()
@ 2014-10-09  9:16 Alexandre Courbot
  0 siblings, 0 replies; only message in thread
From: Alexandre Courbot @ 2014-10-09  9:16 UTC (permalink / raw)
  To: Thierry Reding; +Cc: dri-devel, linux-tegra, linux-kernel, Alexandre Courbot

drm_vblank_get() can return an error, which we should propagate.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drivers/gpu/drm/tegra/dc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 6553fd238685..b08df07cad47 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -699,6 +699,7 @@ static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
 {
 	struct tegra_dc *dc = to_tegra_dc(crtc);
 	struct drm_device *drm = crtc->dev;
+	int ret;
 
 	if (dc->event)
 		return -EBUSY;
@@ -706,7 +707,9 @@ static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
 	if (event) {
 		event->pipe = dc->pipe;
 		dc->event = event;
-		drm_vblank_get(drm, dc->pipe);
+		ret = drm_vblank_get(drm, dc->pipe);
+		if (ret < 0)
+			return ret;
 	}
 
 	tegra_dc_set_base(dc, 0, 0, fb);
-- 
2.1.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-09  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09  9:16 [PATCH] drm: tegra: Check return value of drm_vblank_get() Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome