All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: PATCH Add support for the Iomega IX2-200 Device Tree
Date: Fri, 17 Aug 2012 00:10:00 +0200	[thread overview]
Message-ID: <20120816221000.GG18145@lunn.ch> (raw)
In-Reply-To: <CADhrpJ7geSRc3pow-DQWiA3rZ=f0i2WSws_QuKSDk7uZx1VSRQ@mail.gmail.com>

> the problem seems to be in this comming from this line:
> 
> button->gpio = of_get_gpio_flags(pp, 0, &flags);
> 
> in the function :
> 
> /*
>  * Translate OpenFirmware node properties into platform_data
>  */
> static struct gpio_keys_platform_data * __devinit
> 
> of the gpio_keys.c file or whatever that line links to. It does not
> know how to deal with some NULL reference as far as i can tell.

Do you mean this piece of code:

       while ((pp = of_get_next_child(node, pp))) {
                enum of_gpio_flags flags;

                if (!of_find_property(pp, "gpios", NULL)) {
                        pdata->nbuttons--;
                        dev_warn(dev, "Found button without gpios\n");
                        continue;
                }
                buttons[i].gpio = of_get_gpio_flags(pp, 0, &flags);

This would fit with:

[    5.981782] Unable to handle kernel NULL pointer dereference at
virtual address 00000004
  
since gpio is at offset 4 in buttons. What is the value of i when it
oppses? What is buttons[i]?

	Andrew

  reply	other threads:[~2012-08-16 22:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 20:06 PATCH Add support for the Iomega IX2-200 Device Tree Ownerx35
2012-08-14 23:56 ` Jason Cooper
2012-08-15  8:36   ` Alan M Butler
2012-08-15 11:12     ` Jason Cooper
2012-08-15 11:55       ` Josh Coombs
2012-08-15 12:11         ` Jason Cooper
2012-08-15 12:43           ` alan butler
2012-08-15 13:54             ` Jason Cooper
2012-08-15 18:00               ` alan butler
2012-08-15 20:19                 ` Jason Cooper
2012-08-15 20:56                   ` alan butler
2012-08-15 22:58                     ` Jason Cooper
2012-08-15 21:15                 ` Andrew Lunn
2012-08-15 21:23                   ` alan butler
     [not found]                     ` <20120815213221.GE15830@lunn.ch>
     [not found]                       ` <CADhrpJ4eAUdDaLF8OXvjRf6oA6ya0na-SHYs43eoNwdoEJETpA@mail.gmail.com>
     [not found]                         ` <20120815215237.GF15830@lunn.ch>
2012-08-15 21:57                           ` alan butler
     [not found]                             ` <20120815221613.GH15830@lunn.ch>
     [not found]                               ` <CADhrpJ66ncpT74ATyvJDXTuJC-zrmh8vQ99RPg0t=XuQ_2RcVA@mail.gmail.com>
2012-08-15 23:12                                 ` alan butler
2012-08-15 23:34                                   ` alan butler
2012-08-15 23:41                                     ` Jason Cooper
2012-08-15 23:52                                       ` alan butler
     [not found]                                         ` <CADhrpJ5UF6r2N027nOS6xmJtu21UbDxfzLninCZ7O-A+G3ALgg@mail.gmail.com>
2012-08-16 10:36                                           ` alan butler
2012-08-16 22:10                                             ` Andrew Lunn [this message]
2012-08-17  0:03                                               ` Fabio Estevam
2012-08-16 12:43                                         ` Jason Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120816221000.GG18145@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.