This is a note to let you know that I've just added the patch titled drm/nouveau/kms: Fix failure path for creating DP connectors to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-nouveau-kms-fix-failure-path-for-creating-dp-connectors.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ca0367ca5d9216644b41f86348d6661f8d9e32d8 Mon Sep 17 00:00:00 2001 From: Lyude Paul <lyude@xxxxxxxxxx> Date: Thu, 26 May 2022 16:43:13 -0400 Subject: drm/nouveau/kms: Fix failure path for creating DP connectors From: Lyude Paul <lyude@xxxxxxxxxx> commit ca0367ca5d9216644b41f86348d6661f8d9e32d8 upstream. It looks like that when we moved nouveau over to using drm_dp_aux_init() and registering it's aux bus during late connector registration, we totally forgot to fix the failure codepath in nouveau_connector_create() - as it still seems to assume that drm_dp_aux_init() can fail (it can't). So, let's fix that and also add a missing check to ensure that we've properly allocated nv_connector->aux.name while we're at it. Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx> Reviewed-by: David Airlie <airlied@xxxxxxxx> Fixes: fd43ad9d47e7 ("drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister") Cc: <stable@xxxxxxxxxxxxxxx> # v5.14+ Link: https://patchwork.freedesktop.org/patch/msgid/20220526204313.656473-1-lyude@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/nouveau/nouveau_connector.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -1361,13 +1361,11 @@ nouveau_connector_create(struct drm_devi snprintf(aux_name, sizeof(aux_name), "sor-%04x-%04x", dcbe->hasht, dcbe->hashm); nv_connector->aux.name = kstrdup(aux_name, GFP_KERNEL); - drm_dp_aux_init(&nv_connector->aux); - if (ret) { - NV_ERROR(drm, "Failed to init AUX adapter for sor-%04x-%04x: %d\n", - dcbe->hasht, dcbe->hashm, ret); + if (!nv_connector->aux.name) { kfree(nv_connector); - return ERR_PTR(ret); + return ERR_PTR(-ENOMEM); } + drm_dp_aux_init(&nv_connector->aux); fallthrough; default: funcs = &nouveau_connector_funcs; Patches currently in stable-queue which might be from lyude@xxxxxxxxxx are queue-5.19/drm-nouveau-acpi-don-t-print-error-when-we-get-einprogress-from-pm_runtime.patch queue-5.19/drm-nouveau-fix-another-off-by-one-in-nvbios_addr.patch queue-5.19/drm-dp-mst-read-the-extended-dpcd-capabilities-during-system-resume.patch queue-5.19/drm-nouveau-kms-fix-failure-path-for-creating-dp-connectors.patch queue-5.19/drm-nouveau-don-t-pm_runtime_put_sync-only-pm_runtime_put_autosuspend.patch