From patchwork Thu Aug 28 17:40:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 4805991 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 189AF9F2A9 for ; Thu, 28 Aug 2014 17:40:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28165200D4 for ; Thu, 28 Aug 2014 17:40:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3E07A200DC for ; Thu, 28 Aug 2014 17:40:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A17856E0E5; Thu, 28 Aug 2014 10:40:35 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) by gabe.freedesktop.org (Postfix) with ESMTP id CF6D36E3A1; Thu, 28 Aug 2014 10:40:33 -0700 (PDT) Received: by mail-yk0-f171.google.com with SMTP id 9so705245ykp.30 for ; Thu, 28 Aug 2014 10:40:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VhGPyI3PZPkpXnDzkOKLFE6FILnGhiOgh4Ub4I3u9Y0=; b=etcHNflEjrmCPGaKfeqP7uru//8+Yb8PFtai12FH0BrmOAraZfIQg/gpuMUJ9DWazg VYzfm/6pcjACZZyVLVM12YsQczivpIQc5hW5dV35pMXPO/VPzb/fNqvi7eddJfpD+Pdf nlYPLXT7f1nXTNUi31WFLQaYA8yUwRPu8eSole2RgAKdl/ysSYavAVvQInUzEfrmdS1x c0uILexK90SGUTozJxWoP+oEs0XdVi0SBmASEv2dcP6cKu1RzD0t9/Hbzt6i8ULYh8KI LcnJMRi9VI8yOUz3KYkujarU8hkZsSbA6UJy/tua13sa6Se/twx3qs426gKhUxft0M5X xxyg== X-Received: by 10.236.47.201 with SMTP id t49mr6476557yhb.123.1409247633479; Thu, 28 Aug 2014 10:40:33 -0700 (PDT) Received: from localhost.localdomain ([187.10.18.246]) by mx.google.com with ESMTPSA id a14sm2020073yho.33.2014.08.28.10.40.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Aug 2014 10:40:32 -0700 (PDT) From: Gustavo Padovan To: intel-gfx@lists.freedesktop.org Subject: [PATCH 8/9] drm/i915: return error if fb is NULL Date: Thu, 28 Aug 2014 14:40:12 -0300 Message-Id: <1409247613-14232-8-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1409247613-14232-1-git-send-email-gustavo@padovan.org> References: <1409247613-14232-1-git-send-email-gustavo@padovan.org> Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan intel_pipe_check_base() should return an error is the fb received is set to NULL. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 42bd6c6..eb6febf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2681,7 +2681,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, /* no fb bound */ if (!fb) { DRM_ERROR("No FB bound\n"); - return 0; + return -EINVAL; } if (intel_crtc->plane > INTEL_INFO(dev)->num_pipes) {