diff options
author | Jeffrey Hugo <jeffrey.l.hugo@gmail.com> | 2019-05-21 08:00:30 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2019-06-18 13:54:48 -0700 |
commit | fc19cbb785d7bbd1a1af26229b5240a3ab332744 (patch) | |
tree | 557a605e909f05320e4e2378dcdc33fe620dd5bb /drivers/gpu/drm/msm | |
parent | 03b7af1ef4992bd0dc2b758e94698054fbbb19eb (diff) | |
download | linux-fc19cbb785d7bbd1a1af26229b5240a3ab332744.tar.bz2 |
drm/msm/mdp5: Fix mdp5_cfg_init error return
If mdp5_cfg_init fails because of an unknown major version, a null pointer
dereference occurs. This is because the caller of init expects error
pointers, but init returns NULL on error. Fix this by returning the
expected values on error.
Fixes: 2e362e1772b8 (drm/msm/mdp5: introduce mdp5_cfg module)
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c index ea8f7d7daf7f..52e23780fce1 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c @@ -721,7 +721,7 @@ fail: 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) |