On 12/01/2017 02:34 AM, Will Newton wrote:
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.

Reviewed-by: Archit Taneja <arch...@codeaurora.org>

Signed-off-by: Will Newton <will.new...@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 
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 
        if (cfg_handler)
- return NULL;
+       return ERR_PTR(ret);
static struct mdp5_cfg_platform *mdp5_get_config(struct platform_device *dev)

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Freedreno mailing list

Reply via email to