Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752228AbaJIJRB (ORCPT ); Thu, 9 Oct 2014 05:17:01 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:3518 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbaJIJQy (ORCPT ); Thu, 9 Oct 2014 05:16:54 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 09 Oct 2014 02:16:40 -0700 From: Alexandre Courbot To: Thierry Reding CC: , , , Alexandre Courbot Subject: [PATCH] drm: tegra: Check return value of drm_vblank_get() Date: Thu, 9 Oct 2014 18:16:49 +0900 Message-ID: <1412846209-28630-1-git-send-email-acourbot@nvidia.com> X-Mailer: git-send-email 2.1.2 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drm_vblank_get() can return an error, which we should propagate. Signed-off-by: Alexandre Courbot --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/