Message ID | 20211112120411.1541681-6-juergh@canonical.com |
---|---|
State | New |
Headers | show |
Series | Unable to boot rpi2, rpi3, rpi3b+, rpi3a+, and cm3+ after upgrade to kernel 5.11.0-1022.23-raspi (LP: #1950064) | expand |
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index 45b4dca385e6..c2c125972d23 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -432,7 +432,7 @@ static int rpi_firmware_remove(struct platform_device *pdev) */ struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) { - struct platform_device *pdev = g_pdev; + struct platform_device *pdev = of_find_device_by_node(firmware_node); struct rpi_firmware *fw; if (!pdev)
BugLink: https://bugs.launchpad.net/bugs/1950064 The upstream commit 09cbd1df7d26 ("firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()'") releases a reference which was never taken in our kernel due to a downstream raspberrypi commit. This leads to a kernel crash but apparently only on Pi 3 and 2. Fix that by reverting part of the downstream commit which also happend recently in the downstream kernel but silently during a merge... Signed-off-by: Juerg Haefliger <juergh@canonical.com> --- drivers/firmware/raspberrypi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)