Skip to content
Commit 4be1eaf3 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Linus Walleij
Browse files

pinctrl: nuvoton: check for devm_kasprintf() failure



devm_kasprintf() may return NULL on failure of internal allocation thus
the assignment to  .label  is not safe if not checked. On error
npcm7xx_gpio_of() returns negative values so -ENOMEM in the
(unlikely) failure case of devm_kasprintf() should be fine here.

Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Fixes: 3b588e43 ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 45fd26d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment