Skip to content

Commit

Permalink
generic: 5.15: backport smempart parser fixup patch with EPROBE_DEFER…
Browse files Browse the repository at this point in the history
… error

Backport patch from kernel 5.15 that mute error on EPROBE_DEFER with
smempart parser.

This parser require the smem device to be probed first and currently it
may happen that mtd gets probed before the smem device causing an error
on the smempart parser. This error may be confusing and should be muted.

Signed-off-by: Christian Marangi <[email protected]>
  • Loading branch information
Ansuel authored and aiamadeus committed Oct 26, 2022
1 parent d4dc60f commit ea7c4d1
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 26bccc9671ba5e01f7153addbe94e7dc3f677375 Mon Sep 17 00:00:00 2001
From: Bryan O'Donoghue <[email protected]>
Date: Mon, 3 Jan 2022 03:03:16 +0000
Subject: [PATCH 13/14] mtd: parsers: qcom: Don't print error message on
-EPROBE_DEFER

Its possible for the main smem driver to not be loaded by the time we come
along to parse the smem partition description but, this is a perfectly
normal thing.

No need to print out an error message in this case.

Signed-off-by: Bryan O'Donoghue <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
---
drivers/mtd/parsers/qcomsmempart.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/mtd/parsers/qcomsmempart.c
+++ b/drivers/mtd/parsers/qcomsmempart.c
@@ -75,7 +75,8 @@ static int parse_qcomsmem_part(struct mt
pr_debug("Parsing partition table info from SMEM\n");
ptable = qcom_smem_get(SMEM_APPS, SMEM_AARM_PARTITION_TABLE, &len);
if (IS_ERR(ptable)) {
- pr_err("Error reading partition table header\n");
+ if (PTR_ERR(ptable) != -EPROBE_DEFER)
+ pr_err("Error reading partition table header\n");
return PTR_ERR(ptable);
}

0 comments on commit ea7c4d1

Please sign in to comment.