This is a note to let you know that I've just added the patch titled clk: bcm: rpi: Fix error handling of raspberrypi_fw_get_rate to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: clk-bcm-rpi-fix-error-handling-of-raspberrypi_fw_get.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit b97af4e14516b33692ef4712df305da8400f01a0 Author: Stefan Wahren <stefan.wahren@xxxxxxxx> Date: Sat Jun 25 10:36:43 2022 +0200 clk: bcm: rpi: Fix error handling of raspberrypi_fw_get_rate [ Upstream commit 35f73cca1cecda0c1f8bb7d8be4ce5cd2d46ae8c ] The function raspberrypi_fw_get_rate (e.g. used for the recalc_rate hook) can fail to get the clock rate from the firmware. In this case we cannot return a signed error value, which would be casted to unsigned long. Fix this by returning 0 instead. Signed-off-by: Stefan Wahren <stefan.wahren@xxxxxxxx> Link: https://lore.kernel.org/r/20220625083643.4012-1-stefan.wahren@xxxxxxxx Fixes: 4e85e535e6cc ("clk: bcm283x: add driver interfacing with Raspberry Pi's firmware") Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx> Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 1654fd0eedc94..a790a8ca02ff4 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -113,7 +113,7 @@ static unsigned long raspberrypi_fw_pll_get_rate(struct clk_hw *hw, RPI_FIRMWARE_ARM_CLK_ID, &val); if (ret) - return ret; + return 0; return val * RPI_FIRMWARE_PLLB_ARM_DIV_RATE; }