Ma Ke 2df7aac810 drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes
In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is
assigned to mode, which will lead to a possible NULL pointer dereference
on failure of drm_mode_duplicate(). Add a check to avoid npd.

Cc: stable@vger.kernel.org
Fixes: 89c78134cc54 ("gma500: Add Poulsbo support")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240709092011.3204970-1-make24@iscas.ac.cn
2024-07-09 20:02:02 +02:00
..
2023-11-27 13:56:32 -06:00
2024-04-22 14:35:52 +10:00
2024-05-22 11:40:09 -07:00
2024-04-22 21:44:31 +03:00
2024-02-05 13:50:15 +10:00
2024-05-23 17:07:13 +02:00
2024-07-03 09:45:36 +02:00
2024-05-15 09:43:42 -07:00
2024-02-05 13:50:15 +10:00
2024-05-27 13:47:14 +10:00
2024-04-15 16:13:39 +02:00
2024-04-18 13:29:15 +03:00
2024-04-25 20:55:49 -07:00
2024-01-12 11:32:19 -08:00
2024-05-27 13:47:14 +10:00
2024-04-22 14:35:52 +10:00
2024-05-02 14:30:31 +10:00
2024-04-15 16:12:49 +02:00
2024-02-26 11:41:07 +01:00
2024-04-15 16:12:49 +02:00