Message ID | 20180516101510.13215-26-peda@axentia.se (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Geert Uytterhoeven |
Headers | show
Return-Path: <linux-renesas-soc-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 208606037D for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Wed, 16 May 2018 10:18:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FC20284F1 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Wed, 16 May 2018 10:18:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 042012856D; Wed, 16 May 2018 10:18:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A44A42851E for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Wed, 16 May 2018 10:18:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752470AbeEPKSB (ORCPT <rfc822;patchwork-linux-renesas-soc@patchwork.kernel.org>); Wed, 16 May 2018 06:18:01 -0400 Received: from mail-he1eur01on0131.outbound.protection.outlook.com ([104.47.0.131]:54176 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752611AbeEPKQy (ORCPT <rfc822;linux-renesas-soc@vger.kernel.org>); Wed, 16 May 2018 06:16:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ThU+XKfLpARDAksGVFlK7fOZaHeOXTn/iuDA+60MBQ=; b=ZzNvnK3wnp/KOmPBIJxBuriGzc412m30pCrd9qsCgsbeGUo/ginJJtytoMThZ2jKcjOPU1vgP+XEbIiXjh/9aTFkYxXNZugF2GhTbBeTwo4T73/cvBSEQoFvGRWCLNNfUxNA5nfknrt3D2t6cAEKBbSXeo1EoY5mFoDvn0nbsLo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from orc.pedanet (85.226.244.23) by AM4PR0202MB2772.eurprd02.prod.outlook.com (2603:10a6:200:8c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.11; Wed, 16 May 2018 10:16:47 +0000 From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Cc: Peter Rosin <peda@axentia.se>, Archit Taneja <architt@codeaurora.org>, Andrzej Hajda <a.hajda@samsung.com>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, David Airlie <airlied@linux.ie>, Martin Donnelly <martin.donnelly@ge.com>, Martyn Welch <martyn.welch@collabora.co.uk>, Gustavo Padovan <gustavo@padovan.org>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Sean Paul <seanpaul@chromium.org>, Inki Dae <inki.dae@samsung.com>, Joonyoung Shim <jy0922.shim@samsung.com>, Seung-Woo Kim <sw0312.kim@samsung.com>, Kyungmin Park <kyungmin.park@samsung.com>, Kukjin Kim <kgene@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, CK Hu <ck.hu@mediatek.com>, Philipp Zabel <p.zabel@pengutronix.de>, Matthias Brugger <matthias.bgg@gmail.com>, Rob Clark <robdclark@gmail.com>, Sandy Huang <hjc@rock-chips.com>, =?UTF-8?q?Heiko=20St=C3=BCbner?= <heiko@sntech.de>, Benjamin Gaignard <benjamin.gaignard@linaro.org>, Vincent Abriou <vincent.abriou@st.com>, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Jyri Sarha <jsarha@ti.com>, Daniel Vetter <daniel@ffwll.ch> Subject: [PATCH v3 25/26] drm/bridge: require the owner .odev to be filled in on drm_bridge_add/attach Date: Wed, 16 May 2018 12:15:09 +0200 Message-Id: <20180516101510.13215-26-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180516101510.13215-1-peda@axentia.se> References: <20180516101510.13215-1-peda@axentia.se> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR0102CA0013.eurprd01.prod.exchangelabs.com (2603:10a6:7:14::26) To AM4PR0202MB2772.eurprd02.prod.outlook.com (2603:10a6:200:8c::22) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:AM4PR0202MB2772; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0202MB2772; 3:a+nKViyBCNdbfLARgrkxPoaIUsBDKj9V5CIPBPCiueDjHFcDfZNo2vs7fMHcEiQ5CyC9IOKZPoOVsbdCR2Uh8jl7p7e7JocP4q5X2sX/pC55J7ladRk5SWjmZaTmSobbDE0+5vzPXBrwxvp8EWJTn6S8+H2i8SWU98JMHDWDVnQmdA4eHAPPArEElDFv/S58jYzX28n2BFFxChFOAbpZ1R11AID1BLLHL2Re7BqU0HuwIkQbrPT3oOfSKWAAC2KS; 25:gbLMoN+oy2DGQNFnWaJySE/kjiHe136geaHZiz+8gNDHwLoKu2BY9lPf5C8bay9tZYTehpXd6fJIbzTbBCB1PADJRtrVUwIxhLJIjl+ZLLE78Zk/AzUR4mEsk9x1x6yA110XIdzPRYGjBtVCQ67ZaxCDhP+pX8NjEA/u0IzAZnSyqyC5ZPDJAjoOhsgOIYscOzinSP+R9Kv+VaZeuV76ZQO37of56fhTAHh4XikfZueej2/yPZ2Cixzmii34WGlcIXImcXTYuqIaKJRIvORLLPDfJIm48ug/8P68CmchM1rdv9pSJ8wEnVha11Wt89SW9QUT5/KhaYBvUWo77MiKUg==; 31:Cj2BrLGwNuLxFucDvzga/K3sp3OZScfIuBkp/QoCJBIcN5KRmGnPI5lxm0Sbs/uf4JDRARQny4xcZFIgokqTecBqNewD6FaMdmXjYrGjk4O8IgD3pqHNpqISBnLxRrlgE6hojxexR7i4FcAuHW27cWEzcsc0GfRFYbQgfih3bn2QHvhNkSSbBDybsehhwtS1Qa0BjiMsgeDgqEwY6/zaxJL8RbIJzfyKYhHgFZyxYzI= X-MS-TrafficTypeDiagnostic: AM4PR0202MB2772: X-Microsoft-Antispam-PRVS: <AM4PR0202MB27729A6CBAFE75DBBD8DE77CBC920@AM4PR0202MB2772.eurprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(7411616537696); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(6043046)(201708071742011); SRVR:AM4PR0202MB2772; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0202MB2772; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0202MB2772; 4:bg4rxIQ4bRdctY1Q6Xj9cRVHMx5svWh9hQ2+nwR6NoRgSBy4hsU50Rl6tTpbk8liUvlhYdgKwoEUwmCG5uPrNP0BvYQhMdxEQuCNzQ7FiVrZLvtcd8AEPl6eHJxM9gUZwzSpgvmN+TMFH8jNnBznHMkK82Ul0p7LpnO72tjXH4eVM7oqyl77DF1SKyBC7r4itgvnkJB1MfkWrTItxzR4LDRPk1/JYGDFrPbMwGs2kJtuWke3pvOJI33vyR+Eb2gASlxIIFNN+cDYIXc0bSELKW4T+bF1QzDQF6EFK0XDTjfwa+gz3Fo19Ke762q4iyNz X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(346002)(376002)(39840400004)(366004)(189003)(199004)(86362001)(7416002)(25786009)(48376002)(50466002)(68736007)(36756003)(2906002)(105586002)(97736004)(6666003)(6916009)(74482002)(7406005)(2351001)(3846002)(6116002)(1076002)(478600001)(106356001)(316002)(16586007)(2361001)(7736002)(50226002)(53936002)(6512007)(305945005)(51416003)(8936002)(52116002)(8676002)(16526019)(76176011)(446003)(66066001)(5660300001)(39060400002)(5890100001)(54906003)(47776003)(81156014)(476003)(2616005)(956004)(81166006)(186003)(386003)(6506007)(26005)(59450400001)(4326008)(11346002)(486006)(6486002)(142923001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR0202MB2772; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR0202MB2772; 23:O368dKT+P7NmH1ilp0Bj3zi/evIBkNtmTR/ogjA?= =?us-ascii?Q?N2lCXVA7gKWFNC+XSRyfsMYWfB9nhaPGMADqBO8jIT+f/7+0v7ILsznTwzhs?= =?us-ascii?Q?CH4MZ0Z8vBod4PI4yJTgTtdBZ1xSYWkEFI3jv9343fFDh7ClzNaSTMcJ4M07?= =?us-ascii?Q?L0w8w3VRVORh8sAUgAHpkG9UvZd450COeO/yLESSaE55eyDC8QaxZOTgt9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g6T7PhbCjMCrbO598O9o3G+fFc+VYUYcIJI6RA2osap5ohdx7HnPoU6BeGesDNFEvBxjTCW1FX26QUx8quNaF2x0uq0EhP5cxYW5dLke3bA4w==; 5:c/6n1KtqDxiKUQnatlWS2J8vCs6SgxBla1VZINs1c9Y3AHQoBJUb1aPJ+3feEPCKN0bhhjRYNScbMUGHFh2xAQAfibbZRXV7w0Tsa6llAqMJ4pIk6PehKmEKstpGWEoxL8oliWYy1Z7GuAsX7B7ta9jON4U6lj2HM8n25M6WxJg=; 24:dXUuEhKrkV/iutrjdGP1apwx7NOZhRRS9O0fULRiuCB85cs3/4Kbh3PkX6iP83F2d8vB4NnGNKjnC4MeAMpE8fTg+ds670uBL12eh8EiKK8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR0202MB2772; 7:Iw9MBrCOKbAvXIhZRQq6ADhQHZnAOiChResiEf6cl+ooIL9ne1UdEhmBeovM1ZMQu3+X3eqoNxzNO0wArUEG5RFnvBME+vZlTJB8cOF/aQ+gP0yXn08FP21xEDjWJyCUiTeoHGNZvo3RVAQXNXaSW9NY6bWo7GWjORN5HDESIjf9FhIEbp2fMdfxfWU/NgTVKv1AydvZ5Hj4pLoS7hO4Yl0VpYg2IwK4fiDeiqwwaSly5xFJIQqPHUCZn/wCkGH/ X-MS-Office365-Filtering-Correlation-Id: 73e4dc1d-1dde-4ed4-4156-08d5bb16235a X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 10:16:47.8898 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73e4dc1d-1dde-4ed4-4156-08d5bb16235a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0202MB2772 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-renesas-soc.vger.kernel.org> X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index df084db33494..78d186b6831b 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -70,6 +70,9 @@ static LIST_HEAD(bridge_list); */ void drm_bridge_add(struct drm_bridge *bridge) { + if (WARN_ON(!bridge->odev)) + return; + mutex_lock(&bridge_lock); list_add_tail(&bridge->list, &bridge_list); mutex_unlock(&bridge_lock); @@ -115,6 +118,9 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge, if (!encoder || !bridge) return -EINVAL; + if (WARN_ON(!bridge->odev)) + return -EINVAL; + if (previous && (!previous->dev || previous->encoder != encoder)) return -EINVAL;