From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EBAFC7618A for ; Mon, 20 Mar 2023 10:17:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbjCTKRV (ORCPT ); Mon, 20 Mar 2023 06:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbjCTKRU (ORCPT ); Mon, 20 Mar 2023 06:17:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47F221287A for ; Mon, 20 Mar 2023 03:17:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D864A61337 for ; Mon, 20 Mar 2023 10:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7B3DC433D2; Mon, 20 Mar 2023 10:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679307438; bh=TCjQVSksJ0Qf/C2fODNa3GvTl06v7yARaRa7jNGtyns=; h=Subject:To:Cc:From:Date:From; b=cKeLbefKKto1rLeoNCNy3P9bE4fuCUcZEL8fp2wovo07Xb2QS/STpT/ph2h0UXbpe Zh7yS1xSNp23zHZIxH5paqSnHyTE5GZF3ufLepRJxOKR23C3rWglPb0XQbigGiyo6y Hxd3UE762eRXrDnc1V3bnLTCHhqjgMzD4s73UERU= Subject: FAILED: patch "[PATCH] drm/sun4i: fix missing component unbind on bind errors" failed to apply to 4.14-stable tree To: johan+linaro@kernel.org, maxime@cerno.tech, mripard@kernel.org Cc: From: Date: Mon, 20 Mar 2023 11:17:03 +0100 Message-ID: <167930742311110@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.14.y git checkout FETCH_HEAD git cherry-pick -x c22f2ff8724b49dce2ae797e9fbf4bc0fa91112f # git commit -s git send-email --to '' --in-reply-to '167930742311110@kroah.com' --subject-prefix 'PATCH 4.14.y' HEAD^.. Possible dependencies: c22f2ff8724b ("drm/sun4i: fix missing component unbind on bind errors") 6848c291a54f ("drm/aperture: Convert drivers to aperture interfaces") dc739820ff90 ("drm/ast: fix memory leak when unload the driver") 31856c8c1ce4 ("drm/vmwgfx: Remove stealth mode") 840462e6872d ("drm/vmwgfx: Remove references to struct drm_device.pdev") 5bbacc2e7ab1 ("drm/virtgpu: Remove references to struct drm_device.pdev") cff0adca1edd ("drm/ast: Managed device release") 4bc85b82c8ba ("drm/ast: Manage release of firmware backup memory") 2c0b6566d621 ("drm/ast: Managed release of ast firmware") e0f5a738cfe5 ("drm/ast: Embed struct drm_device in struct ast_private") fbe01716ed4a ("drm/ast: Replace driver load/unload functions with device create/destroy") d50ace1e72f0 ("drm/ast: Separate DRM driver from PCI code") 03ba7e00f805 ("drm/ast: Use managed MM initialization") 0149e7805b3c ("drm/ast: Move VRAM size detection to ast_mm.c") 8e46dc585389 ("drm/ast: Use managed VRAM-helper initialization") e6949ff3ca85 ("drm/ast: Initialize mode setting in ast_mode_config_init()") 1728bf6402c3 ("drm/ast: Use managed mode-config init") 6bb18c9be6d2 ("drm/ast: Init cursors before creating modesetting structures") 3e9d787371ea ("drm/ast: Managed cursor release") 0d384eec10ea ("drm/ast: Keep cursor HW BOs mapped") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c22f2ff8724b49dce2ae797e9fbf4bc0fa91112f Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Mon, 6 Mar 2023 11:32:42 +0100 Subject: [PATCH] drm/sun4i: fix missing component unbind on bind errors Make sure to unbind all subcomponents when binding the aggregate device fails. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Cc: stable@vger.kernel.org # 4.7 Cc: Maxime Ripard Signed-off-by: Johan Hovold Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230306103242.4775-1-johan+linaro@kernel.org diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index cc94efbbf2d4..d6c741716167 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -95,12 +95,12 @@ static int sun4i_drv_bind(struct device *dev) /* drm_vblank_init calls kcalloc, which can fail */ ret = drm_vblank_init(drm, drm->mode_config.num_crtc); if (ret) - goto cleanup_mode_config; + goto unbind_all; /* Remove early framebuffers (ie. simplefb) */ ret = drm_aperture_remove_framebuffers(false, &sun4i_drv_driver); if (ret) - goto cleanup_mode_config; + goto unbind_all; sun4i_framebuffer_init(drm); @@ -119,6 +119,8 @@ static int sun4i_drv_bind(struct device *dev) finish_poll: drm_kms_helper_poll_fini(drm); +unbind_all: + component_unbind_all(dev, NULL); cleanup_mode_config: drm_mode_config_cleanup(drm); of_reserved_mem_device_release(dev);