Skip to contentSkip to conversation

ar0521: Remove redundant variable ret

PATCH New Sakari Ailus 1 participant 1 message Aug 14, 2022

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 ar0521: Remove redundant variable ret

ret in ar0521_set_fmt is never set to values other than 0. Replace it with plain 0.

---
 drivers/media/i2c/ar0521.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/i2c/ar0521.c +1 -2
index e850c92d847e4..9e90b02b15e36 100644
@@ -406,7 +406,6 @@ static int ar0521_set_fmt(struct v4l2_subdev *sd,
 			  struct v4l2_subdev_format *format)
 {
 	struct ar0521_dev *sensor = to_ar0521_dev(sd);
-	int ret = 0;
 
 	ar0521_adj_fmt(&format->format);
 
@@ -423,7 +422,7 @@ static int ar0521_set_fmt(struct v4l2_subdev *sd,
 	}
 
 	mutex_unlock(&sensor->lock);
-	return ret;
+	return 0;
 }
 
 static int ar0521_s_ctrl(struct v4l2_ctrl *ctrl)
Signature · 1 line
2.30.2