linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] drm/pl111: Error handling for CMA framebuffer
Date: Fri, 26 Jan 2018 14:20:30 +0100	[thread overview]
Message-ID: <20180126132033.19744-1-linus.walleij@linaro.org> (raw)

When attaching the CMA framebuffer we need to check for
returned error pointers.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 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);
 
-- 
2.14.3

             reply	other threads:[~2018-01-26 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 13:20 Linus Walleij [this message]
2018-01-26 13:20 ` [PATCH 2/4] drm/pl111: Properly detect the PL110+ variant Linus Walleij
2018-01-29 23:45   ` Eric Anholt
2018-01-30 15:39     ` Linus Walleij
2018-01-26 13:20 ` [PATCH 3/4] drm/pl111: Handle the Versatile RGB/BGR565 mode Linus Walleij
2018-01-26 13:20 ` [PATCH 4/4] drm/pl111: Support multiple endpoints on the CLCD Linus Walleij
2018-01-29 23:55   ` Eric Anholt
2018-02-01 12:49     ` Linus Walleij
2018-01-29 23:39 ` [PATCH 1/4] drm/pl111: Error handling for CMA framebuffer Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180126132033.19744-1-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).