[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdY8_8BZ6HJV4qE_b9-Ln6TLK_m6DNUpgoh7x61F915nJw@mail.gmail.com>
Date: Wed, 13 Dec 2017 08:36:39 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Quentin Schulz <quentin.schulz@...e-electrons.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Chen-Yu Tsai <wens@...e.org>,
Russell King <linux@...linux.org.uk>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Lee Jones <lee.jones@...aro.org>, linux-gpio@...r.kernel.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
linux-sunxi <linux-sunxi@...glegroups.com>
Subject: Re: [PATCH v5 8/9] pinctrl: axp209: add support for AXP813 GPIOs
On Fri, Dec 8, 2017 at 2:41 PM, Quentin Schulz
<quentin.schulz@...e-electrons.com> wrote:
>> - pctl->desc = &axp20x_data;
>> + pctl->desc = (struct axp20x_pctrl_desc *)of_device_get_match_data(dev);
>> pctl->regmap = axp20x->regmap;
>> pctl->dev = &pdev->dev;
>>
>
> I am using pctl->desc before retrieving it, thus dereferencing from a
> null pointer.
>
> We just have to move
> pctl->chip.ngpio = pctl->desc->npins;
> after
> pctl->desc = (struct axp20x_pctrl_desc *)of_device_get_match_data(dev);
>
> Linus, I guess that I should send a patch to fix this or is there an
> other way not to have to apply such a small and dumb patch?
Just send a patch based on my pin control tree "devel" branch or
linux-next, it's cool.
Things like this happens all the time.
Yours,
Linus Walleij
Powered by blists - more mailing lists