kernel: bump 6.1 to 6.1.66
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0537-bcm2835-mmc-Honor-return-value-of-mmc_of_parse.patch
1 From a29e90b43912193131804427e133d1869695044f Mon Sep 17 00:00:00 2001
2 From: Lukas Wunner <lukas@wunner.de>
3 Date: Sat, 14 Jan 2023 10:03:46 +0100
4 Subject: [PATCH] bcm2835-mmc: Honor return value of mmc_of_parse()
5
6 bcm2835_mmc_probe() ignores errors returned by mmc_of_parse() and in
7 particular ignores -EPROBE_DEFER, which may be returned if the power
8 sequencing driver configured in the devicetree is compiled as a module.
9
10 The user-visible result is that access to the SDIO device fails because
11 its power sequencing requirements have not been observed. Fix it.
12
13 Signed-off-by: Lukas Wunner <lukas@wunner.de>
14 ---
15 drivers/mmc/host/bcm2835-mmc.c | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
17
18 --- a/drivers/mmc/host/bcm2835-mmc.c
19 +++ b/drivers/mmc/host/bcm2835-mmc.c
20 @@ -1474,7 +1474,9 @@ static int bcm2835_mmc_probe(struct plat
21 }
22
23 if (node) {
24 - mmc_of_parse(mmc);
25 + ret = mmc_of_parse(mmc);
26 + if (ret)
27 + goto err;
28
29 /* Read any custom properties */
30 of_property_read_u32(node,