diff mbox series

[v2,6/8] Add debug log info to msm_csid_subdev_init function

Message ID 20240624-b4-sc7180-camss-v2-6-0dfecdc50073@gmail.com (mailing list archive)
State New
Headers show
Series Add sc7180 camss subsys support | expand

Commit Message

George Chan via B4 Relay June 23, 2024, 11:22 p.m. UTC
From: George Chan <gchan9527@gmail.com>

Print out missing clock's name when doing msm_csid_subdev_init().

Signed-off-by: George Chan <gchan9527@gmail.com>
---
 drivers/media/platform/qcom/camss/camss-csid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Bryan O'Donoghue June 24, 2024, 10:08 a.m. UTC | #1
On 24/06/2024 00:22, George Chan via B4 Relay wrote:
> +			dev_err(dev, "missing clk %s", res->clock[i]);

Please don't abbreviate - the other error message says "clock" here we 
say "clk"

Once fixed to clock please add

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Krzysztof Kozlowski June 24, 2024, 10:19 a.m. UTC | #2
On 24/06/2024 12:08, Bryan O'Donoghue wrote:
> On 24/06/2024 00:22, George Chan via B4 Relay wrote:
>> +			dev_err(dev, "missing clk %s", res->clock[i]);
> 
> Please don't abbreviate - the other error message says "clock" here we 
> say "clk"
> 

Is it a probe path? If yes, then this should be dev_err_probe. If not,
then are you sure that non-probe paths should acquire resources? How
does it handle deferred probe in such case?

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index eb27d69e89a1..02162bf9dbc0 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -628,8 +628,10 @@  int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid,
 		struct camss_clock *clock = &csid->clock[i];
 
 		clock->clk = devm_clk_get(dev, res->clock[i]);
-		if (IS_ERR(clock->clk))
+		if (IS_ERR(clock->clk)) {
+			dev_err(dev, "missing clk %s", res->clock[i]);
 			return PTR_ERR(clock->clk);
+		}
 
 		clock->name = res->clock[i];