aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-12-08 11:41:56 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-12-08 11:41:56 -0800
commitd650b3beff76bd0d1eaba6c706f9fbac52137339 (patch)
treeb0c0e991af2d1f93707a2ae800ee228b7e592e86
parentb8b68d2fd41c1068554290fdf2c5adc6b03d40ce (diff)
parent4e7a8dbd2bc0aec4605a5069df7a779bd9e64db1 (diff)
Merge tag 'pwm/for-6.7-rc5-fixes' of https://git.pengutronix.de/git/ukl/linux
Pull pwm fix from Uwe Kleine-König: "This fixes a null pointer exception in the bcm2835 pwm driver. The problem was introduced by a combination of two commits merged for v6.7-rc1 where each change alone would have been fine. Thanks to Florian Fainelli for noticing and fixing the issue" * tag 'pwm/for-6.7-rc5-fixes' of https://git.pengutronix.de/git/ukl/linux: pwm: bcm2835: Fix NPD in suspend/resume
-rw-r--r--drivers/pwm/pwm-bcm2835.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 9777babd5b95..ab30667f4f95 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -155,6 +155,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
pc->chip.ops = &bcm2835_pwm_ops;
pc->chip.npwm = 2;
+ platform_set_drvdata(pdev, pc);
+
ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
if (ret < 0)
return dev_err_probe(&pdev->dev, ret,