mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
pinctrl: madera: Fix possible NULL pointer with pdata config
If we are being configured via pdata we don't necessarily have any gpio mappings being configured that way so pdata->gpio_config could be NULL. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
823dd71f58
commit
5bc5a671b1
1 changed files with 1 additions and 1 deletions
|
|
@ -1040,7 +1040,7 @@ static int madera_pin_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* if the configuration is provided through pdata, apply it */
|
||||
if (pdata) {
|
||||
if (pdata && pdata->gpio_configs) {
|
||||
ret = pinctrl_register_mappings(pdata->gpio_configs,
|
||||
pdata->n_gpio_configs);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue