[PATCH v3 09/15] media: qcom: camss: Improve error printout on icc_get fail

Bryan O'Donoghue posted 15 patches 2 years, 3 months ago
There is a newer version of this series
[PATCH v3 09/15] media: qcom: camss: Improve error printout on icc_get fail
Posted by Bryan O'Donoghue 2 years, 3 months ago
If icc_get() fails print the name of the failing path.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/platform/qcom/camss/camss.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index c8b8ad176ee2b..72a0a9f304bb2 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -1504,8 +1504,11 @@ static int camss_icc_get(struct camss *camss)
 	for (i = 0; i < camss->res->icc_path_num; i++) {
 		camss->icc_path[i] = devm_of_icc_get(camss->dev,
 						     icc_res[i].name);
-		if (IS_ERR(camss->icc_path[i]))
+		if (IS_ERR(camss->icc_path[i])) {
+			dev_err(camss->dev, "Unable to icc_get %s\n",
+				icc_res[i].name);
 			return PTR_ERR(camss->icc_path[i]);
+		}
 	}
 
 	return 0;
-- 
2.41.0
Re: [PATCH v3 09/15] media: qcom: camss: Improve error printout on icc_get fail
Posted by Konrad Dybcio 2 years, 3 months ago
On 23.08.2023 12:44, Bryan O'Donoghue wrote:
> If icc_get() fails print the name of the failing path.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Aren't the return messages propagated from

* of_icc_get()
	|_ of_icc_get_by_index()

enough here?

Perhaps we should use dev_err_probe in camss too

Konrad
Re: [PATCH v3 09/15] media: qcom: camss: Improve error printout on icc_get fail
Posted by Bryan O'Donoghue 2 years, 3 months ago
On 26/08/2023 11:05, Konrad Dybcio wrote:
> On 23.08.2023 12:44, Bryan O'Donoghue wrote:
>> If icc_get() fails print the name of the failing path.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
> Aren't the return messages propagated from
> 
> * of_icc_get()
> 	|_ of_icc_get_by_index()
> 
> enough here?
> 
> Perhaps we should use dev_err_probe in camss too
> 
> Konrad

IDK, I will check