From patchwork Tue Sep 1 15:11:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264668 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85D18C433E6 for ; Tue, 1 Sep 2020 15:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61DCB206EB for ; Tue, 1 Sep 2020 15:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598975791; bh=VkK32spEftFakciF2wjRC4/wdBx3aETtnf9kbrda1DE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=o6YWcnPi+pOL8PL/fQy7oODkDuYGoUubXVRgpwslFBJXPmDLwM7czJyZL1XtAH6ib 5MskshGSL0XUMleiXXkFeM6otIZZKzdqcD/T/p78k4Dyq5Dx4JwB6r5C3ynHQ1KZBX HLF5Eii23F9ml0IlSY2mc/cQ4//59182GJo8IV+Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729573AbgIAP41 (ORCPT ); Tue, 1 Sep 2020 11:56:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:33240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731619AbgIAPpL (ORCPT ); Tue, 1 Sep 2020 11:45:11 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C29072078B; Tue, 1 Sep 2020 15:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598975110; bh=VkK32spEftFakciF2wjRC4/wdBx3aETtnf9kbrda1DE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IG74q5laFZOcLdvFwUg/hisxnoky/WBuQ4vTOKDjGUYDRCrfqla8cBkdFFOy79fsF BIeCDFtU7jdTMm0+WGhm7CpBd2FTffRyJM0tkKhY70RFB5DhG44yPnh/2nRCAAHwY6 iIQpxssbz5+/I+u6F3dQJ2lKjtZ5R/5daet7HiPc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bhawanpreet Lakha , Lyude Paul Subject: [PATCH 5.8 212/255] drm/dp_mst: Dont return error code when crtc is null Date: Tue, 1 Sep 2020 17:11:08 +0200 Message-Id: <20200901151010.859326789@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200901151000.800754757@linuxfoundation.org> References: <20200901151000.800754757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bhawanpreet Lakha commit 88fee1c9007a38c19f2c558dc0ab1ddb4c323dc5 upstream. [Why] In certain cases the crtc can be NULL and returning -EINVAL causes atomic check to fail when it shouln't. This leads to valid configurations failing because atomic check fails. [How] Don't early return if crtc is null Signed-off-by: Bhawanpreet Lakha Reviewed-by: Lyude Paul [added stable cc] Signed-off-by: Lyude Paul Fixes: 8ec046716ca8 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs") Cc: # v5.6+ Link: https://patchwork.freedesktop.org/patch/msgid/20200814170140.24917-1-Bhawanpreet.Lakha@amd.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -4993,8 +4993,8 @@ int drm_dp_mst_add_affected_dsc_crtcs(st crtc = conn_state->crtc; - if (WARN_ON(!crtc)) - return -EINVAL; + if (!crtc) + continue; if (!drm_dp_mst_dsc_aux_for_port(pos->port)) continue;