[PATCH v2] staging: most: dim2: use dev_err_probe() for clock errors in rcar enable functions

From: Batu Ada Tutkun

Date: Tue Jun 23 2026 - 15:48:19 EST


rcar_gen2_enable() and rcar_gen3_enable() use the old pattern of
dev_err() followed by return PTR_ERR() when devm_clk_get() fails.
fsl_mx6_enable() in the same file was already converted to use
dev_err_probe() by a previous cleanup series.

Convert the remaining two functions for consistency. devm_clk_get()
calls clk_get() which can return -EPROBE_DEFER if the clock provider
has not yet registered. Using dev_err_probe() suppresses the log at
error level in that case, avoiding misleading "cannot get clock" output
during a normal deferred probe.

clk_prepare_enable() cannot return -EPROBE_DEFER since the clock handle
is already acquired at that point, so those error paths are left as
dev_err().

Signed-off-by: Batu Ada Tutkun <batuadatutkun@xxxxxxxxx>
---
Compile tested only. No R-Car hardware available. This is a correctness
fix for the deferred probe path, not a response to a reported
user visible issue.

Changes in v2:
- Mention clk_get() explicitly in commit message
- Add testing note under --- cut off line

drivers/staging/most/video/video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 04351f8cc..1e1ff3c52 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -33,14 +33,14 @@ struct most_video_dev {
bool mute;

struct list_head pending_mbos;
- spinlock_t list_lock;
+ spinlock_t list_lock; /* protects pending_mbos and mute */

struct v4l2_device v4l2_dev;
atomic_t access_ref;
struct video_device *vdev;
unsigned int ctrl_input;

- struct mutex lock;
+ struct mutex lock; /* serializes V4L2 ioctls */

wait_queue_head_t wait_data;
};
--
2.53.0