Skip to content
Commit 7b7fba10 authored by Gong Yuanjun's avatar Gong Yuanjun Committed by Greg Kroah-Hartman
Browse files

drm/radeon: fix a possible null pointer dereference

[ Upstream commit a2b28708

 ]

In radeon_fp_native_mode(), the return value of drm_mode_duplicate()
is assigned to mode, which will lead to a NULL pointer dereference
on failure of drm_mode_duplicate(). Add a check to avoid npd.

The failure status of drm_cvt_mode() on the other path is checked too.

Signed-off-by: default avatarGong Yuanjun <ruc_gongyuanjun@163.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 10ef82d6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment