From patchwork Fri Aug 26 15:25:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9301631 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 B7865607EE for ; Fri, 26 Aug 2016 15:34:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A961529501 for ; Fri, 26 Aug 2016 15:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E3012953E; Fri, 26 Aug 2016 15:34:52 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 DE52E295A1 for ; Fri, 26 Aug 2016 15:34:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753751AbcHZPep (ORCPT ); Fri, 26 Aug 2016 11:34:45 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:55279 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753029AbcHZPen (ORCPT ); Fri, 26 Aug 2016 11:34:43 -0400 Received: from wuerfel.lan. ([176.0.135.42]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0Lr6Jj-1b9RvB2zZr-00ed0q; Fri, 26 Aug 2016 17:26:54 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Arnd Bergmann , Linus Walleij , linux-fbdev@vger.kernel.org, Russell King , Tomi Valkeinen Subject: [PATCH 2/5] video: ARM CLCD: fix endpoint lookup logic Date: Fri, 26 Aug 2016 17:25:43 +0200 Message-Id: <20160826152546.604384-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160826152546.604384-1-arnd@arndb.de> References: <20160826152546.604384-1-arnd@arndb.de> X-Provags-ID: V03:K0:kpmxnr+U1b1J0EpZw0f63cBnxgbXb8cDykyo/Z7i7EC7d1CVaQP vfgNx3waXBckIEut6e44Jq4ykzFlORkn2PIzECj4BVRioExsvkoNJa3BFJSazTyPiTbYWCN X9K3GGtGRBK++vuAPth+HrVEIpQWskE3EgjgX0PZd2vIB/ViDD/XqUxUs2NroJKo/SgiN05 SGE794cgXYqnIAab1ko/A== X-UI-Out-Filterresults: notjunk:1; V01:K0:6xQ5ACyQIoI=:qpFvtr3HxqdOOo4w8r0bit dj+ATOxwWlAYlqfQqK5vKTFulJWWUdjY7MO7E7zuE88tN0dB+YRkbeZogpAOxrm220t0Pu5Cu iYpOfZhfp9zUnR/Er/ecu6KczxODq03SRHfyJ90PjJhuEXTNUXmr92gGHdLKDnqwI1dCuXKjn S+EDy7c7p17+MLpZXtHumTuyTOYo6OhTrmc8mScP+aBdCMaCaNAtbcmIwomLRw7oQ5UWGB/B5 YO+maUgB0fPK5SPuRDGKgvTX5Ti7GfrbfsEm4MZuOdL5cyvMPaf3xdvJ0eV7S69PWn+Pg1MND lDZHHtESLMKCgZi+KRU/IJ91LQtLK+7Gp+Z8nZ1RaxKuYMq+zZVOTriY5hA1dDJcX/BjtWN61 v1n6UCe4TcBmOIncPw8CXAJpQFHR+vJdrAjlDUL8HHsUqT0ov4r+Ni7ncOtB/FxUFfg4QKfGn a7sOK8fn1s9dwJFOjEaNKX9C4ePmiTos9lTA2CrEVJLc7Z8fyC7A16IybO9ecayXrq86IasP4 a2FZUchA8phZ7AnrnuYyeHwiERNJfAMAITUuvun8eq+mYWCY39nBKbgd3IQtGvDDKVyKUL+dd ulz3f+RaVRSBOtIPJ2kq2yTP6IepdPsgXIrZrJbgQFq6Pqd0DusrE5TosSIunw/qCI7Fq04GS 8ubhv/sshTo5Wl5JWw8j3ugpZXgE3OHl8izul0BM6WlDb7jZ1BEg/KluiDgLPoLfPZjg= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The addition of the Nomadik support in this driver introduced a bug in clcdfb_of_init_display(), which now calls init_panel with an uninitialized 'endpoint' pointer, as "gcc -Wmaybe-uninitialized" warns: drivers/video/fbdev/amba-clcd.c: In function 'clcdfb_of_init_display': drivers/video/fbdev/amba-clcd.c:785:5: error: 'endpoint' may be used uninitialized in this function [-Werror=maybe-uninitialized] This reverts the broken part of the function to what it was before the patch, which is the best guess I have to what it should be. I assume this was left over from an attempted rework of the code that was partially backed out. Signed-off-by: Arnd Bergmann Fixes: 046ad6cdeb3f ("video: ARM CLCD: support Nomadik variant") Cc: Linus Walleij Reviewed-by: Linus Walleij Reported-by: Colin Ian King --- Cc: linux-fbdev@vger.kernel.org Cc: Russell King Cc: Tomi Valkeinen drivers/video/fbdev/amba-clcd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index c342ff370108..ec2671d98abc 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -782,12 +782,9 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) /* * Fetch the panel endpoint. */ - if (!endpoint) { - endpoint = of_graph_get_next_endpoint(fb->dev->dev.of_node, - NULL); - if (!endpoint) - return -ENODEV; - } + endpoint = of_graph_get_next_endpoint(fb->dev->dev.of_node, NULL); + if (!endpoint) + return -ENODEV; if (fb->vendor->init_panel) { err = fb->vendor->init_panel(fb, endpoint);