Skip to contentSkip to conversation

media: i2c: ov8865: remove unnecessary NULL check

PATCH New Paul Kocialkowski 1 participant 1 message Apr 12, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: i2c: ov8865: remove unnecessary NULL check

The check on mode_index is sufficient to ensure that we have a valid mode. Remove the explicit mode check similarly to commit 38a50230292f ("media: i2c: ov5648: remove unnecessary NULL check")

---
 drivers/media/i2c/ov8865.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov8865.c +1 -1
index 9ecf180635ee..4ad85dc4cd1f 100644
@@ -2691,7 +2691,7 @@ static int ov8865_enum_frame_interval(struct v4l2_subdev *subdev,
 		}
 	}
 
-	if (mode_index == ARRAY_SIZE(ov8865_modes) || !mode)
+	if (mode_index == ARRAY_SIZE(ov8865_modes))
 		return -EINVAL;
 
 	interval_enum->interval = mode->frame_interval;
Signature · 1 line
2.31.1