From: Will Newton <will.newton@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
Will Newton <will.newton@gmail.com>
Subject: [PATCH] mdp5: Return error values from mdp5_cfg_init
Date: Thu, 30 Nov 2017 21:04:16 +0000 [thread overview]
Message-ID: <20171130210416.8229-1-will.newton@gmail.com> (raw)
The return value of this function is a pointer checked with
IS_ERR, so we should be returning an error pointer rather than
NULL when the init fails.
Signed-off-by: Will Newton <will.newton@gmail.com>
---
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
index 824067d2d427..42f0ecb0cf35 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
@@ -635,7 +635,7 @@ struct mdp5_cfg_handler *mdp5_cfg_init(struct mdp5_kms *mdp5_kms,
if (cfg_handler)
mdp5_cfg_destroy(cfg_handler);
- return NULL;
+ return ERR_PTR(ret);
}
static struct mdp5_cfg_platform *mdp5_get_config(struct platform_device *dev)
--
2.14.3
next reply other threads:[~2017-11-30 21:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 21:04 Will Newton [this message]
[not found] ` <20171130210416.8229-1-will.newton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-04 8:23 ` [PATCH] mdp5: Return error values from mdp5_cfg_init Archit Taneja
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=20171130210416.8229-1-will.newton@gmail.com \
--to=will.newton@gmail.com \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@gmail.com \
/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