diff mbox series

[v2,2/2] mtd: parsers: qcom: Don't print error message on -EPROBE_DEFER

Message ID 20220103030316.58301-3-bryan.odonoghue@linaro.org
State Accepted
Headers show
Series Two Qcom NAND related fixes. | expand

Commit Message

Bryan O'Donoghue Jan. 3, 2022, 3:03 a.m. UTC
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 <bryan.odonoghue@linaro.org>
---
 drivers/mtd/parsers/qcomsmempart.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Manivannan Sadhasivam Jan. 3, 2022, 5:52 a.m. UTC | #1
On Mon, Jan 03, 2022 at 03:03:16AM +0000, Bryan O'Donoghue wrote:
> 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 <bryan.odonoghue@linaro.org>

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks,
Mani

> ---
>  drivers/mtd/parsers/qcomsmempart.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/parsers/qcomsmempart.c b/drivers/mtd/parsers/qcomsmempart.c
> index 06a818cd2433f..b2a57fe8479fa 100644
> --- a/drivers/mtd/parsers/qcomsmempart.c
> +++ b/drivers/mtd/parsers/qcomsmempart.c
> @@ -75,7 +75,8 @@ static int parse_qcomsmem_part(struct mtd_info *mtd,
>  	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);
>  	}
>  
> -- 
> 2.33.0
>
Miquel Raynal Jan. 23, 2022, 3:23 p.m. UTC | #2
On Mon, 2022-01-03 at 03:03:16 UTC, Bryan O'Donoghue wrote:
> 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 <bryan.odonoghue@linaro.org>
> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel
diff mbox series

Patch

diff --git a/drivers/mtd/parsers/qcomsmempart.c b/drivers/mtd/parsers/qcomsmempart.c
index 06a818cd2433f..b2a57fe8479fa 100644
--- a/drivers/mtd/parsers/qcomsmempart.c
+++ b/drivers/mtd/parsers/qcomsmempart.c
@@ -75,7 +75,8 @@  static int parse_qcomsmem_part(struct mtd_info *mtd,
 	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);
 	}