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: 10185697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4C6C601D5 for ; Fri, 26 Jan 2018 13:20:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9452827B81 for ; Fri, 26 Jan 2018 13:20:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 892B528B94; Fri, 26 Jan 2018 13:20:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EBDA327B81 for ; Fri, 26 Jan 2018 13:20:44 +0000 (UTC) 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-Google-Smtp-Source: AH8x227Jkx2fj0CYMmoxG93pWB6tjbGJe8A2nsEQg3Tm01LQjBu4X5DgV/RRrj/TTelIbrcMjJjAZA== 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" X-Virus-Scanned: ClamAV using ClamSMTP 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);