Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fcad12e authored by Lee Jones's avatar Lee Jones Committed by Linus Walleij
Browse files

pinctrl: abx500: Specify failed sub-driver by ID instead of driver_data



If a sub-driver has not been specified correctly, there is a good chance
that plat_id is NULL, hence using an attribute of plat_id in the error
message is likely to not only fail the driver but Oops the kernel. Use
the failed ID instead.

Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f722406f
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -900,8 +900,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
		abx500_pinctrl_ab8505_init(&pct->soc);
		abx500_pinctrl_ab8505_init(&pct->soc);
		break;
		break;
	default:
	default:
		dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n",
		dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id);
				(int) platid->driver_data);
		mutex_destroy(&pct->lock);
		mutex_destroy(&pct->lock);
		return -EINVAL;
		return -EINVAL;
	}
	}