mdp5: Return error values from mdp5_cfg_init
PATCH 1/1 mdp5: Return error values from mdp5_cfg_init
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 <[email protected]>
--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c +1 -1
@@ -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)
Signature · 1 line
2.14.3
A message that is not in the archive (sent off-list or not yet received): 20171130210416.8229-1-will.newton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Archit Taneja
Reviewed-byQuoted 3 lines · Will Newton
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 <[email protected]>
Quoted 20 lines
Signed-off-by Will Newton <[email protected]>--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c +1
-1@@ -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)
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno