projects/linux·commit d650b3be

Merge tag 'pwm/for-6.7-rc5-fixes' of https://git.pengutronix.de/git/ukl/linux

d650b3be · Linus Torvalds <[email protected]> · 2023-12-08 11:41:56 -08:00

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
Commit
d650b3beff76bd0d1eaba6c706f9fbac52137339
Parents
b8b68d2f · 4e7a8dbd

Merge commit. Changes below are compared with the first parent: b8b68d2f.

Changes

1 files changed · +2 −0

FileStatusAddDelContent
drivers/pwm/pwm-bcm2835.cmodified+2−0View file

drivers/pwm/pwm-bcm2835.c

View file
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 9777bab..ab30667 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,