From patchwork Thu Jun 19 01:52:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Welling X-Patchwork-Id: 4380351 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5D411BEEAA for ; Thu, 19 Jun 2014 01:52:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95E50202EB for ; Thu, 19 Jun 2014 01:52:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CEE1202D1 for ; Thu, 19 Jun 2014 01:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756225AbaFSBwX (ORCPT ); Wed, 18 Jun 2014 21:52:23 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:51158 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754277AbaFSBwW (ORCPT ); Wed, 18 Jun 2014 21:52:22 -0400 Received: by mail-ig0-f179.google.com with SMTP id r2so1480205igi.12 for ; Wed, 18 Jun 2014 18:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=WKVNp9HUWI4QSGtskDpvaiRkwIRrXHjihlRjf0q+sY4=; b=XIISwJz2jQ8H/ry50IayH7ARYZsri382D5BJCBZJh+POCJDOVlStX1elgr8zw8TBi9 6S7KgsBrg92ts0ZJz1S+2ZVt6TEz26Jwaf8q7UWAu5MaepJ1aB27Hb0CKrfwvbW1sLGI Y+6gQnsMTJaAdbAIfyoW/sU01l7ObGJX7RLmHqRG8h5vL0MU7syWHoW3nWjrQgFzxVU9 iTl5cBJx83dhLSzu4AZzbM8Y9pP6ux4vC9Fc5OlRL/V3JW/CU0svYIi8L5NpqCbpIsi5 eMd6JOCG+9Opb3PWd8blH3a5CtLIvhIqEwh0+OLYZUQ6uFdzIpYdESK43EzzAP95PABb weMw== X-Received: by 10.50.43.167 with SMTP id x7mr2662417igl.36.1403142741829; Wed, 18 Jun 2014 18:52:21 -0700 (PDT) Received: from deathray.hitronhub.home (173-22-240-38.client.mchsi.com. [173.22.240.38]) by mx.google.com with ESMTPSA id dz3sm2817156igb.3.2014.06.18.18.52.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Jun 2014 18:52:20 -0700 (PDT) From: Michael Welling To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Nicolas Ferre , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michael Welling Subject: [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug Date: Wed, 18 Jun 2014 20:52:12 -0500 Message-Id: <1403142732-31706-1-git-send-email-mwelling@ieee.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 A list that was intended for storing power control GPIOs was never initialized correctly or filled. Without these lines of added code the kernel hangs when trying to access an uninitialized list when a power control GPIO is registered with the device tree. Signed-off-by: Michael Welling Acked-by: Nicolas Ferre --- drivers/video/fbdev/atmel_lcdfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index e683b6e..d36e830 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo) goto put_display_node; } + INIT_LIST_HEAD(&pdata->pwr_gpios); ret = -ENOMEM; for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) { gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio", @@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo) dev_err(dev, "set direction output gpio %d failed\n", gpio); goto put_display_node; } + list_add(&og->list, &pdata->pwr_gpios); } if (is_gpio_power)