Gong Yuanjun 28fd384c78 drm/radeon: fix a possible null pointer dereference
[ Upstream commit a2b28708b645c5632dc93669ab06e97874c8244f ]

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: Gong Yuanjun <ruc_gongyuanjun@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:12:01 +02:00
..
2019-08-14 18:31:10 +02:00
2019-09-19 16:24:24 -07:00
2019-08-14 18:30:52 +02:00
2019-12-13 08:42:56 +01:00
2022-06-14 18:11:32 +02:00
2019-06-30 09:48:05 +02:00
2019-08-09 09:15:05 +02:00
2019-07-17 12:52:55 +02:00
2020-06-30 15:37:11 -04:00
2019-07-15 18:11:31 +02:00
2019-07-17 12:52:55 +02:00
2021-11-26 10:47:22 +01:00
2021-05-11 14:04:10 +02:00
2020-02-11 04:35:36 -08:00
2021-03-30 14:35:22 +02:00