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 D3D4DC77B7F for ; Sat, 13 May 2023 06:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbjEMGof (ORCPT ); Sat, 13 May 2023 02:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjEMGoe (ORCPT ); Sat, 13 May 2023 02:44:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF16E2D48 for ; Fri, 12 May 2023 23:44:33 -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 7D228614D0 for ; Sat, 13 May 2023 06:44:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ED15C433EF; Sat, 13 May 2023 06:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683960272; bh=z+KwNBZiZBndvJeIczejPAXKUgq/g6040/KZ8+p4+oA=; h=Subject:To:Cc:From:Date:From; b=hMCRkGF62gQA06ianMzUrO7c6/usfvrrMMFsC7C8dKkzVOCROvRpY1HEwOEtaGp0C LU4uGqTCsdk6LkR3qMVrO96W2jqOR6ltlx+iL71Y0sHLrbgeyJ4uuVxkN6QiXSFakO IJDCDpaioxGpyf5/wOH58rautbT9xocWkNJxbLn4= Subject: FAILED: patch "[PATCH] drm/msm: fix missing wq allocation error handling" failed to apply to 5.4-stable tree To: johan+linaro@kernel.org, dmitry.baryshkov@linaro.org, robdclark@gmail.com Cc: From: Date: Sat, 13 May 2023 15:44:05 +0900 Message-ID: <2023051305-bronzing-output-dbca@gregkh> 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 5.4-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-5.4.y git checkout FETCH_HEAD git cherry-pick -x ca090c837b430752038b24e56dd182010d77f6f6 # git commit -s git send-email --to '' --in-reply-to '2023051305-bronzing-output-dbca@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^.. Possible dependencies: ca090c837b43 ("drm/msm: fix missing wq allocation error handling") dfa70344d1b5 ("Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue"") 643b7d0869cc ("drm/msm: Add missing check and destroy for alloc_ordered_workqueue") 2027e5b3413d ("drm/msm: Initialize MDSS irq domain at probe time") ec919e6e7146 ("drm/msm: Allocate msm_drm_private early and pass it as driver data") 83b965d118cb ("Merge remote-tracking branch 'drm/drm-next' into msm-next-staging") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ca090c837b430752038b24e56dd182010d77f6f6 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Mon, 6 Mar 2023 11:07:19 +0100 Subject: [PATCH] drm/msm: fix missing wq allocation error handling Add the missing sanity check to handle workqueue allocation failures. Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Cc: stable@vger.kernel.org # 3.12 Cc: Rob Clark Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525102/ Link: https://lore.kernel.org/r/20230306100722.28485-8-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 4d85ca0ba0c1..2a9a363afe50 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -433,6 +433,10 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv) priv->dev = ddev; priv->wq = alloc_ordered_workqueue("msm", 0); + if (!priv->wq) { + ret = -ENOMEM; + goto err_put_dev; + } INIT_LIST_HEAD(&priv->objects); mutex_init(&priv->obj_lock);