[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-09-08 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive

[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-09-02 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive

[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-08-24 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive

[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-08-18 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive

[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-08-10 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive

[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-08-01 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive