From patchwork Fri Jan 26 13:20:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 125965 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp330672ljd; Fri, 26 Jan 2018 05:20:45 -0800 (PST) X-Google-Smtp-Source: AH8x227+Bw6+XOS7Q9ek38Jj2OVL72IS0JYNqveTxY/UU9IDx2vZrJlej1YVcXpmlQrQW+2pMRgL X-Received: by 10.98.228.5 with SMTP id r5mr19643604pfh.193.1516972845063; Fri, 26 Jan 2018 05:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516972845; cv=none; d=google.com; s=arc-20160816; b=F2hw8tftc8w14jpwpHUv/Mvosrq6iEDwvE9CWB5WSgE9zon6Z3cNPg/0hIfU40y8Vl 8Jc6HVWAwK3pEa2cyO0e7VWIgVIYtQqwDMN/fsWZ4rG4zpH/YXapa46N9r9xbBZBXFb/ BKxNASipEwUwAHCYjo9Ig/3s5UlJMea1MpCBckAIBgpnADUz5qD7OeACCfX8AJsK07Q/ CIm+Ezdb2SIqUx4ez/6mpt9kxbeA8ETIO5K+i6wU1T8GTqAFAL37W9mRa6ouNMquUgov pfX7ImOSwWAEOzsbFUFZ1ZkmejwH41fDjxAjCM77p3JlJUu4oKsVZKmuu7l2FkQPfT+P prMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=iV7KXGgm9X//dapNRlbBvik8oc9J5funDeVgnQwOJR8=; b=rf4rQ9crdKSp+J7fttypEb9CFiwSxtdB/fGFP4HAu5fH+6xT2gl0W1YAJFv20VG1J+ GXxvWDcr6Fw2J5KjXtQQ1xKPS+edgd83/HIH9GeqtnDzx8fvE3GjXFzx/VFpiJ0M+tBu yliuOaR8Eup8SbFKXXDK2TTGhNYs+hBay7fmXHIkNRX6h09z6ZY4kpkbX/aclTH4GZez /kGwFbLf64on4p5ANY0mLtgaYKff+MiRRTSkI8yuL7DFXUNVWb8mMyG8EYqKjASo2Drf 8lhRvvJiZoG3HozjVHfR4/sARH073l/rm19hv7KosuN+Wt6n4rpfcb1j1vlXfeM6Uonh qXRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Z/C0NrR9; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id y20si6452351pfj.54.2018.01.26.05.20.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2018 05:20:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Z/C0NrR9; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BEF906E176; Fri, 26 Jan 2018 13:20:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E4DF6E176 for ; Fri, 26 Jan 2018 13:20:42 +0000 (UTC) Received: by mail-lf0-x242.google.com with SMTP id o89so644574lfg.10 for ; Fri, 26 Jan 2018 05:20:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Q47rlS+oWZ01AoXsipqIQT5sxkBpdi+W9BbMoCFdoDk=; b=Z/C0NrR9gb+XrYpC9wf5ey4id9YfuavfIBej0+eJKtFqoTZ1xGx5ZzkSvc2Y7oVHqB 2G5IRKECoOTViGtCCe2sAhzkj1Yg62Xz88f2A3MEiFnPWQM7h34hykINObuCIBbkFPmh +9MCQlPptGpPmPM55Ohqjaqt27XO2F2JMFBLg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Q47rlS+oWZ01AoXsipqIQT5sxkBpdi+W9BbMoCFdoDk=; b=DOYJLN32+xeyQgKCbqptWwLX+doDzNCm9yvvLLAR1lxpsrtcoGiHGxkd5Qu7YQhmN3 Z1LshbIxMzjhRuBfHhF4uZFV2ftr9n/RmkShmlOgys8Fmv4TVQV5Hg4ztqtPTu8WzUSy 8Rwg6eTMBYWFwb/qydMUGcubeWGOv8IpM0J0LfPchqoqIGQNvnrwPFUmjeWKj7l8hfNm IWxdTgKXpvD4ihsJ8XqLzvBYIQ7tb6oBxxFWyWm1E4blBFQBimJ59S/6qKEtFFfvtck3 86xtcuKEpbsiO8ZNw90gxDYXZQpjnXzQT8rMET6KeoLQ28ZbffJ/uQxYUhC00UjmbW6k cotw== X-Gm-Message-State: AKwxytei6S+25YY3GcAFHnhU8DIpfRRywtGVbRgBLZviZB2FauTtKpUT Pf2v4n57b2zGFdumGXcpA5i13Q== X-Received: by 10.46.4.15 with SMTP id 15mr8254537lje.64.1516972840488; Fri, 26 Jan 2018 05:20:40 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id h15sm937704ljh.77.2018.01.26.05.20.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2018 05:20:39 -0800 (PST) From: Linus Walleij To: Daniel Vetter , Jani Nikula , Sean Paul , Eric Anholt Subject: [PATCH 1/4] drm/pl111: Error handling for CMA framebuffer Date: Fri, 26 Jan 2018 14:20:30 +0100 Message-Id: <20180126132033.19744-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When attaching the CMA framebuffer we need to check for returned error pointers. Signed-off-by: Linus Walleij --- drivers/gpu/drm/pl111/pl111_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 101a9c7db6ff..31a0c4268cc6 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -141,6 +141,11 @@ static int pl111_modeset_init(struct drm_device *dev) priv->fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_connector); + if (IS_ERR(priv->fbdev)) { + dev_err(dev->dev, "Failed to initialize CMA framebuffer\n"); + ret = PTR_ERR(priv->fbdev); + goto out_bridge; + } drm_kms_helper_poll_init(dev);