Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5335650ybc; Wed, 27 Nov 2019 02:26:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwOMemoFuBiEuCQSiJ98C+1832tKOL4rmhuXe8Zu7ZOhT4g8Ei5ZZp3KKpe8q+QXg3jjOCd X-Received: by 2002:aa7:c990:: with SMTP id c16mr31086224edt.91.1574850392927; Wed, 27 Nov 2019 02:26:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574850392; cv=none; d=google.com; s=arc-20160816; b=mvwUsk2eP62KOjcQKQ4haYnoharuXmsIcbRbrOZF3FpS/U7oxZfuuWclDLGnc9e3b7 PLh+hdvQCzA+EnpE45lYFBSRbdTCGFh7Fr4Vjb03f3HiIaKLF2jGYFlvsQ0zUtPrv45m /atzeioSudpcbvnQZmncUPtl1vsh5VLKjwe9Y3Iz+2Wlb9U7J0QslefvzIqf20J9DF+b H1jrzg0iFN6Z5cr9nFIfu1CSbOZPlQx8ah9Cg4GsfaV9QFUnzIbDscM7A90iRJ7hfwYf a+ZGgBGIAuLHK3uNKiGzFJqjF295bvN67Q3DbmdlexXFiWc6QWpwq+pQxl2upVTq7f9Q NxBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=DGAu8nBd8sSn0yVexjpoA/8nuPadx0SdCFMZkuAqTjI=; b=jMgmKPekxV+LdidNBc9JZLwVfpqP+peuCCYg4uXunVKUX6a/Gfy1ka/mNdrtK39NSA E1cbttO2PUj9CWjMtewNIfwDe5gs2KDTqUDTwg6X+Z1ADNHXQXn1jcB0z0E5BUIZB0i1 AwlXN96aTNGCLY7g80LISezDdNdz5gDagidJOlgFa4wSn3jKts82D6v87vTL3qwYv5J0 xwCBQ/LbdgXugwXaqgaOLzUNXknzQ0rrwy4IA0zKt4nQsgGkIoN8a/E/JW4axWUZggBx q7ijIMPrYWiYZ2n17MuutkVMB/FqgqQQUhINqL8j5k+gJ+77LaO8DiXcaJ1+Kq0Xzlg4 7jww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=ygulLg2e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si2482847edc.300.2019.11.27.02.26.09; Wed, 27 Nov 2019 02:26:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=ygulLg2e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbfK0KXD (ORCPT + 99 others); Wed, 27 Nov 2019 05:23:03 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:27280 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbfK0KXD (ORCPT ); Wed, 27 Nov 2019 05:23:03 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xARAM3r3006174; Wed, 27 Nov 2019 11:22:51 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=STMicroelectronics; bh=DGAu8nBd8sSn0yVexjpoA/8nuPadx0SdCFMZkuAqTjI=; b=ygulLg2e5rLFuUd584h0vuVZhD+RKemgd493AWF3vztp/dF30AIlPn83ICzuODlilTxU 68GX8ZqJt66704So7IBm4ukcmBA8GkDdLslHejaaqixJcgaRkjF4QV4GlSuEqvIBc29i mJXPz/6TRQqMtI9NOvyTIFIZVOTr3E1MxaRbvXKanIGnsjB2vYegAlDIYVe95fUGzwTH TIa7QobmHTOohdnwiXst1FjfyPY0PnoyjiRDohKzq/ZdTHdjt1LGIJ7puffGWhwdB21A jueEyE2x/gECpq6uTHG6hwTYfZLyQ6ePA6pSWlnSMDu3aBgDsku+AvNgXJ3yDN+V2OmP JA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2whcxj2xh5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Nov 2019 11:22:51 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BF3FB10002A; Wed, 27 Nov 2019 11:22:50 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 199782B1211; Wed, 27 Nov 2019 11:22:51 +0100 (CET) Received: from localhost (10.75.127.46) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 27 Nov 2019 11:22:50 +0100 From: Yannick Fertre To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] drm/bridge/synopsys: dsi: check post disable Date: Wed, 27 Nov 2019 11:22:45 +0100 Message-ID: <1574850165-13135-1-git-send-email-yannick.fertre@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-27_02:2019-11-27,2019-11-27 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yannick Fertré Some bridges did not registered the post_disable function. To avoid a crash, check it before calling. Signed-off-by: Yannick Fertre --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index cc806ba..1e37233 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -886,7 +886,8 @@ static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge) * This needs to be fixed in the drm_bridge framework and the API * needs to be updated to manage our own call chains... */ - dsi->panel_bridge->funcs->post_disable(dsi->panel_bridge); + if (dsi->panel_bridge->funcs->post_disable) + dsi->panel_bridge->funcs->post_disable(dsi->panel_bridge); if (dsi->slave) { dw_mipi_dsi_disable(dsi->slave); -- 2.7.4