public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup()
@ 2026-04-29  2:03 auth
  2026-04-29  5:48 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: auth @ 2026-04-29  2:03 UTC (permalink / raw)
  To: Andy Shevchenko, Hans de Goede, Mauro Carvalho Chehab,
	Sakari Ailus, Greg Kroah-Hartman, Kees Cook, auth, Josh Poimboeuf,
	Ingo Molnar,
	open list:INTEL MID (Mobile Internet Device) PLATFORM,
	open list:STAGING - ATOMISP DRIVER, open list:STAGING SUBSYSTEM

Replace misleading comment with description of the function's purpose. Also replace return ret with return 0 since ret is guaranteed to be zero at that point.

Signed-off-by: auth <skunkolee@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index 2c41c496daa6..5f3712d6b81f 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -599,7 +599,7 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 	return ret;
 }
 
-/* TODO: remove it. */
+/* Initialize OV2722 sensor */
 static int ov2722_startup(struct v4l2_subdev *sd)
 {
 	struct ov2722_device *dev = to_ov2722_sensor(sd);
@@ -619,7 +619,7 @@ static int ov2722_startup(struct v4l2_subdev *sd)
 		return ret;
 	}
 
-	return ret;
+	return 0;
 }
 
 static int ov2722_set_fmt(struct v4l2_subdev *sd,
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup()
@ 2026-04-29 23:41 Jack Lee
  2026-04-30  6:05 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Lee @ 2026-04-29 23:41 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, Jack Lee, Josh Poimboeuf,
	Kees Cook, Ingo Molnar, open list:STAGING - ATOMISP DRIVER,
	open list:INTEL MID (Mobile Internet Device) PLATFORM,
	open list:STAGING SUBSYSTEM

Remove stale TODO comment that has been present since the file
was first added to staging in 2017 and was never really acted on.
Also replace return ret with return 0 since ret is guaranteed
to be zero at that point, both write calls return early on
failure.

Signed-off-by: Jack Lee <skunkolee@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index 2c41c496daa6..fcd71cc55731 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -599,7 +599,6 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 	return ret;
 }
 
-/* TODO: remove it. */
 static int ov2722_startup(struct v4l2_subdev *sd)
 {
 	struct ov2722_device *dev = to_ov2722_sensor(sd);
@@ -619,7 +618,7 @@ static int ov2722_startup(struct v4l2_subdev *sd)
 		return ret;
 	}
 
-	return ret;
+	return 0;
 }
 
 static int ov2722_set_fmt(struct v4l2_subdev *sd,
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-30  6:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  2:03 [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup() auth
2026-04-29  5:48 ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2026-04-29 23:41 Jack Lee
2026-04-30  6:05 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox