projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
219be9d
)
drm/amd/display: fix dereferencing possible ERR_PTR()
author
Shirish S
<
[email protected]
>
Thu, 15 Mar 2018 10:31:00 +0000
(16:01 +0530)
committer
Alex Deucher
<
[email protected]
>
Mon, 19 Mar 2018 16:23:23 +0000
(11:23 -0500)
This patch fixes static checker warning caused by
"
36cc549d5986
: "drm/amd/display: disable CRTCs with
NULL FB on their primary plane (V2)"
Reported-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Shirish S <
[email protected]
>
Reviewed-by: Harry Wentland <
[email protected]
>
Acked-by: Alex Deucher <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c345e645f1d72c763f027faaa36be21da75aedbc..95b639eddcb6334bf52fe21654a297e90b325a61 100644
(file)
--- a/
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@
-4794,6
+4794,9
@@
static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state,
return -EDEADLK;
crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);
+ if (IS_ERR(crtc_state))
+ return PTR_ERR(crtc_state);
+
if (crtc->primary == plane && crtc_state->active) {
if (!plane_state->fb)
return -EINVAL;