From patchwork Thu Jul 28 02:14:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9250781 Return-Path: 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 57D3A6075F for ; Thu, 28 Jul 2016 07:48:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C17B219AC for ; Thu, 28 Jul 2016 07:48:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40A6925223; Thu, 28 Jul 2016 07:48:47 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5F0B219AC for ; Thu, 28 Jul 2016 07:48:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 061056E76B; Thu, 28 Jul 2016 07:48:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id D30C36E10A for ; Thu, 28 Jul 2016 02:14:39 +0000 (UTC) Received: by mail-pf0-x242.google.com with SMTP id y134so2771913pfg.3 for ; Wed, 27 Jul 2016 19:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1WK3yU3xoS0qJ7/ymFFM3tisBLEiKXtDy79XuhqqRus=; b=eZA/Vgkzn0q/o2uXxpmUjLJ8ukiBgh6Vrdjf9VE8PabQUopKm7wVCGZYAQx8NK2C4Y hE50DKaJq1Cx2ZMVGIWsBCQUMfJ+ryHDIp8N+Mu8yWhkOmpI3AxAWrh2/pZcckZ2U+y5 cey24N6hSYKXy2NvAz04/M+KoF2Lo56IVfI+XRVe2Tr+3TbptvVlg5M+AqMH0TjSkOl+ mkyjHqdpjYTUvbPB+PhKoloqLEu1eLH/olYjgbZ82REiF/C0kE5y+L1SnW0lmD6uqfAV 6E7o+caD/IlAMxP43jsWQrBkcdvVk1Gl//qQ6bSCFnY8a8Tpnq79DPcALbk29HRqX3K9 FkfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1WK3yU3xoS0qJ7/ymFFM3tisBLEiKXtDy79XuhqqRus=; b=WUqZ5aCO/raxMojFLdaUoxaqkyYCwuwlU0XwKGRC5R9EYuRBUFf3R3VXPFADyHS0Cr jNbLrNRE4YK58jiUFETsjqfMvL7XXHkZv6KrW3apdLTYS9xCFztWpUZ+2g821efGP7GK E6U3ou//d4ScZcpUYpS3ZSlWTl29oUN0SmkA5VmJhhNRMPKHPwbaDsOLzGyP7hqS2Wiu MnkqOfUvHfe91F+Rjyz/etZkDSYi1Xo2NUQivQixbbAn8KKfpYrv5VudjrbI2s3QVKwV NPVVzkQQPuL5sQxigiOD65BuIe2XuFQjj0sf2z0EArqhiixrPrSYN3n+nWx6ios2RKjN xPnQ== X-Gm-Message-State: AEkoouu31kGs2s3YdBvfxb//1nR3Psk0rzE6Nbd1KD9LMkq8FzasYVjectIUOVGTPjCXlA== X-Received: by 10.98.207.6 with SMTP id b6mr54845220pfg.25.1469672078247; Wed, 27 Jul 2016 19:14:38 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id zk7sm11985119pac.41.2016.07.27.19.14.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 19:14:37 -0700 (PDT) From: Wei Yongjun To: Liviu Dudau , Brian Starkey , Mali DP Maintainers , David Airlie Subject: [PATCH -next] drm/arm: mali-dp: Fix error return code in malidp_bind() Date: Thu, 28 Jul 2016 02:14:26 +0000 Message-Id: <1469672066-13401-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-TMASE-Version: CloudMessageScanner-0.0.0000-7.5.1021-22478.000 X-TMASE-Result: 10--6.748000-10.000000 X-TMASE-MatchedRID: QMfkO3kOl484tGBQPT0ZoZdc7I2df+msc3ewuwbSaG5tw+n+iKWyyIZd Y0GqfUpiwV0qWXffyEVs8miomGtO4IqWws9vyPBrA9lly13c/gHt/okBLaEo+H5h6y4KCSJcKLW rCrDVHUni8zVgXoAltlwtzewu2M63c9hVI62Mplxq8/xv2Um1avoLR4+zsDTtw38dXReMtXe3Z3 ld2r6wsjmgpmL+xODQ5stUu2UGEsHb9jwqQonLylZca9RSYo/b X-Mailman-Approved-At: Thu, 28 Jul 2016 07:48:42 +0000 Cc: Wei Yongjun , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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-Virus-Scanned: ClamAV using ClamSMTP Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3c31760e760c ('drm/arm: mali-dp: Set crtc.port to the port instead of the endpoint') Signed-off-by: Wei Yongjun Acked-by: Brian Starkey --- drivers/gpu/drm/arm/malidp_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 4e61ea5..44b24cb 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -362,8 +362,10 @@ static int malidp_bind(struct device *dev) /* Set the CRTC's port so that the encoder component can find it */ ep = of_graph_get_next_endpoint(dev->of_node, NULL); - if (!ep) + if (!ep) { + ret = -EINVAL; goto port_fail; + } malidp->crtc.port = of_get_next_parent(ep); ret = component_bind_all(dev, drm);