[Freedreno] [PATCH] mdp5: Return error values from mdp5_cfg_init
Archit Taneja
architt at codeaurora.org
Mon Dec 4 08:23:37 UTC 2017
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 <architt at codeaurora.org>
>
> Signed-off-by: Will Newton <will.newton at 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)
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
More information about the Freedreno
mailing list