From patchwork Wed Feb 10 11:21:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Palminha X-Patchwork-Id: 8270681 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8A575BEEE5 for ; Wed, 10 Feb 2016 12:20:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 932A720375 for ; Wed, 10 Feb 2016 12:20:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BCDE420270 for ; Wed, 10 Feb 2016 12:20:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5EAE6E6B3; Wed, 10 Feb 2016 04:20:25 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtprelay.synopsys.com (smtprelay4.synopsys.com [198.182.47.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 93CF46E6AD for ; Wed, 10 Feb 2016 03:24:00 -0800 (PST) Received: from dc8secmta2.synopsys.com (dc8secmta2.synopsys.com [10.13.218.202]) by smtprelay.synopsys.com (Postfix) with ESMTP id 8759624E072B; Wed, 10 Feb 2016 03:23:59 -0800 (PST) Received: from dc8secmta2.internal.synopsys.com (dc8secmta2.internal.synopsys.com [127.0.0.1]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 3F4F4A4112; Wed, 10 Feb 2016 03:23:59 -0800 (PST) Received: from mailhost.synopsys.com (unknown [10.13.184.66]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 17614A4102; Wed, 10 Feb 2016 03:23:59 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 098CBF8C; Wed, 10 Feb 2016 03:23:59 -0800 (PST) Received: from us01wehtc1.internal.synopsys.com (us01wehtc1.internal.synopsys.com [10.12.239.235]) by mailhost.synopsys.com (Postfix) with ESMTP id E8281F8A; Wed, 10 Feb 2016 03:23:58 -0800 (PST) Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by us01wehtc1.internal.synopsys.com (10.12.239.231) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 10 Feb 2016 03:21:30 -0800 Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by DE02WEHTCA.internal.synopsys.com (10.225.19.92) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 10 Feb 2016 12:21:28 +0100 Received: from palminha-vm.internal.synopsys.com (10.107.19.98) by DE02WEHTCB.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 10 Feb 2016 12:21:27 +0100 From: Carlos Palminha To: , Daniel Vetter , Lars-Peter Clausen , Laurent Pinchart Subject: [PATCH v2] drm: fixes when bridge mode_fixup is null. Date: Wed, 10 Feb 2016 11:21:16 +0000 Message-ID: <1455103276-2963-1-git-send-email-palminha@synopsys.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455102200-2752-1-git-send-email-palminha@synopsys.com> References: <1455102200-2752-1-git-send-email-palminha@synopsys.com> MIME-Version: 1.0 X-Originating-IP: [10.107.19.98] X-Mailman-Approved-At: Wed, 10 Feb 2016 04:20:25 -0800 Cc: CARLOS.PALMINHA@synopsys.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid drivers to copy/past code to implement functions that will only return true. Changes v1->v2: * Added Signed off by Signed-off-by: Carlos Palminha --- drivers/gpu/drm/drm_bridge.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.5.0 diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index bd93453..4133e51 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -161,6 +161,8 @@ bool drm_bridge_mode_fixup(struct drm_bridge *bridge, if (bridge->funcs->mode_fixup) ret = bridge->funcs->mode_fixup(bridge, mode, adjusted_mode); + else + return true; ret = ret && drm_bridge_mode_fixup(bridge->next, mode, adjusted_mode);