Thread (15 messages) 15 messages, 3 authors, 2017-12-13

Re: [PATCH v5 8/9] pinctrl: axp209: add support for AXP813 GPIOs

From: Linus Walleij <hidden>
Date: 2017-12-13 07:36:44
Also in: linux-arm-kernel, linux-gpio, lkml

On Fri, Dec 8, 2017 at 2:41 PM, Quentin Schulz
[off-list ref] wrote:
quoted
-     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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help