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

Commit 43725feb authored by David Rivshin's avatar David Rivshin Committed by Thierry Reding
Browse files

pwm: omap-dmtimer: Return -EPROBE_DEFER if no dmtimer platform data



If a pwm-omap-dmtimer is probed before the dmtimer it uses, the platform
data won't be set yet.

Fixes: ac30751d ("ARM: OMAP: pdata-quirks: Remove unused timer pdata")
Cc: <stable@vger.kernel.org> # 4.17+
Signed-off-by: default avatarDavid Rivshin <drivshin@allworx.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Tested-by: default avatarPavel Machek <pavel@ucw.cz>
Acked-by: default avatarLadislav Michl <ladis@linux-mips.org>
Tested-by: default avatarAndreas Kemnade <andreas@kemnade.info>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 19ad2b75
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -264,8 +264,9 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)

	timer_pdata = dev_get_platdata(&timer_pdev->dev);
	if (!timer_pdata) {
		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
		ret = -EINVAL;
		dev_dbg(&pdev->dev,
			 "dmtimer pdata structure NULL, deferring probe\n");
		ret = -EPROBE_DEFER;
		goto put;
	}